yamamoto2002 / bitspersampleconv2

Automatically exported from code.google.com/p/bitspersampleconv2
MIT License
0 stars 1 forks source link

could not use exclusive mode #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I love this software as it is the best one, thanks.

One question, i could only use share mode to play music file with my DAC and PC 
but could not use the exclusive mode. If using the exclusive mode, it shows 
error message. 

My DAC is as below:
http://www.dspeaker.com/en/products/20-dual-core.shtml
http://www.dspeaker.com/fileadmin/datasheets/dspeaker/AntiMode20DualCoreEng.pdf

Original issue reported on code.google.com by ufo...@gmail.com on 28 Dec 2012 at 5:02

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by yamamoto2002@gmail.com on 3 Jan 2013 at 7:48

GoogleCodeExporter commented 9 years ago
Hi ufoerp,

I found alternative way to initialize WASAPI exclusive mode.

PlayPcmWin uses WAVEFORMATEXTENSIBLE struct to initialize WASAPI.
but it seems WASAPI also accepts WAVEFORMATEX struct when initializing.

Maybe your device accepts only WAVEFORMATEX struct.
I'd like to know if your device accepts WAVEFORMATEX struct.
Please download PlayPcmIssue121.zip from the Downloads section and report 
result on this issue page.

Regards

Original comment by yamamoto2002@gmail.com on 4 Jan 2013 at 10:54

GoogleCodeExporter commented 9 years ago
output text would be something like this:

WASAPI shared mix format:
  wFormatTag=0xfffe  (WAVE_FORMAT_EXTENSIBLE)
  nChannels=2
  nSamplesPerSec=44100
  nAvgBytesPerSec=352800
  nBlockAlign=8
  wBitsPerSample=32
  cbSize=22
  Samples.wValidBitsPerSample=32
  dwChannelMask=0x3                    (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
  SubFormat=00000003-0000-0010-800000aa00389b71 (KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)
WAVEFORMATEXTENSIBLE KSFORMAT_SUBTYPE_PCM 44100Hz 16bit 2ch: supported.
WAVEFORMATEX         WAVE_FORMAT_PCM      44100Hz 16bit 2ch: supported.
WAVEFORMATEXTENSIBLE KSFORMAT_SUBTYPE_PCM 48000Hz 16bit 2ch: not supported.
WAVEFORMATEX         WAVE_FORMAT_PCM      48000Hz 16bit 2ch: not supported.

Original comment by yamamoto2002@gmail.com on 4 Jan 2013 at 11:09

GoogleCodeExporter commented 9 years ago
Also I'd like to know [supported format] result.
How to get supported format list:
Start PlayPcmWin, clear the playlist, select output device and press [supported 
format]button
and copy log output 

Regards

Original comment by yamamoto2002@gmail.com on 4 Jan 2013 at 11:33

GoogleCodeExporter commented 9 years ago
C:\Users\Administrator>cd..

C:\Users>cd..

C:\>playpcm
PlayPcm device inspect version 1.1
Usage:
    PlayPcm
        Print this message and enumerate all available devices

    PlayPcm -d deviceId
        Test specified device

Device list:
    deviceId=0: Realtek Digital Output (Realtek High Definition Audio)
    deviceId=1: Realtek Digital Output(Optical) (Realtek High Definition Audio)
    deviceId=2: 扬声器 (Anti-Mode 2.0 Dual Core v0.3)

C:\>playpcm -d 2
WASAPI shared mix format:
  wFormatTag=0xfffe
  nChannels=2
  nSamplesPerSec=48000
  nAvgBytesPerSec=384000
  nBlockAlign=8
  wBitsPerSample=32
  cbSize=22
  Samples.wValidBitsPerSample=32
  dwChannelMask=0x3
  SubFormat=00000003-0000-0010-800000aa00389b71
WAVEFORMATEXTENSIBLE KSFORMAT_SUBTYPE_PCM 44100Hz 16bit 2ch: not supported.
WAVEFORMATEX         WAVE_FORMAT_PCM      44100Hz 16bit 2ch: not supported.
WAVEFORMATEXTENSIBLE KSFORMAT_SUBTYPE_PCM 48000Hz 16bit 2ch: not supported.
WAVEFORMATEX         WAVE_FORMAT_PCM      48000Hz 16bit 2ch: not supported.

C:\>

Original comment by ufo...@gmail.com on 5 Jan 2013 at 1:17

GoogleCodeExporter commented 9 years ago
PlayPcmWin 4.0.27.0 64bit
wasapi.Init() 00000000
wasapi.DoDeviceEnumeration(Play) 00000000
wasapi.InspectDevice()
DeviceFriendlyName=扬声器 (Anti-Mode 2.0 Dual Core v0.3)
DeviceIdString={0.0.0.00000000}.{e8eeec3a-821d-4c9d-a98b-177840e36763}
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++
|| 44kHz i16V16|| 48kHz i16V16|| 88kHz i16V16|| 96kHz i16V16||176kHz 
i16V16||192kHz i16V16||352kHz i16V16||384kHz i16V16||
|| NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || 
NA 88890008 || NA 88890008 || NA 88890008 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++
|| 44kHz i24V24|| 48kHz i24V24|| 88kHz i24V24|| 96kHz i24V24||176kHz 
i24V24||192kHz i24V24||352kHz i24V24||384kHz i24V24||
|| OK 00000000 || OK 00000000 || NA 88890008 || NA 88890008 || NA 88890008 || 
NA 88890008 || NA 88890008 || NA 88890008 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++
|| 44kHz i32V24|| 48kHz i32V24|| 88kHz i32V24|| 96kHz i32V24||176kHz 
i32V24||192kHz i32V24||352kHz i32V24||384kHz i32V24||
|| NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || 
NA 88890008 || NA 88890008 || NA 88890008 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++
|| 44kHz i32V32|| 48kHz i32V32|| 88kHz i32V32|| 96kHz i32V32||176kHz 
i32V32||192kHz i32V32||352kHz i32V32||384kHz i32V32||
|| NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || 
NA 88890008 || NA 88890008 || NA 88890008 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++
|| 44kHz f32V32|| 48kHz f32V32|| 88kHz f32V32|| 96kHz f32V32||176kHz 
f32V32||192kHz f32V32||352kHz f32V32||384kHz f32V32||
|| NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || NA 88890008 || 
NA 88890008 || NA 88890008 || NA 88890008 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++

Original comment by ufo...@gmail.com on 5 Jan 2013 at 1:22

GoogleCodeExporter commented 9 years ago
Thank you for providing data!

It seems this device has similar characteristics as Halide bridge.
This device is able to initialize WASAPI exclusive mode with 24bit signed 
integer format.

In order to use WASAPI exclusive with your device, output data format setting 
is necessary.
Start PlayPcmWin, press [Detailed settings] to open detailed settings window,
select [Always use Int24 format ...] menu item from [Quantization bit rate to 
pass through the WASAPI] combobox.

After this setting, if you experience 88890020 error, output latency value is 
out of range. Try 100 ms, 30 ms, 10 ms respectively.

Original comment by yamamoto2002@gmail.com on 5 Jan 2013 at 2:34

GoogleCodeExporter commented 9 years ago
wonderful!!! it is great and ok now and i don't need change the latency. Many 
thanks.

BTW, what is the difference between pro audio mode and play back mode?

Original comment by ufo...@gmail.com on 5 Jan 2013 at 3:08

GoogleCodeExporter commented 9 years ago
I'm glad to hear your device works well with PPW.
I'm going to update error dialog text.

In regard to render thread task type

This parameter is relate to playback glitch probability and power consumption.

Msdn document do not recommend to use "Pro Audio" profile unnecessarily. To 
conserve power, applications should not set Pro Audio unless absolutely 
necessary. They recommend "Pro Audio" for playback using 10 ms or smaller 
latency value.

But recently several other music player software choose "Pro Audio" scheduler 
profile with WASAPI playback.
It seems "Pro Audio" is best option for playback stability. So I chose "Pro 
Audio" for default.

Original comment by yamamoto2002@gmail.com on 5 Jan 2013 at 4:25

GoogleCodeExporter commented 9 years ago
Revision 2863

Original comment by yamamoto2002@gmail.com on 6 Jan 2013 at 7:30

GoogleCodeExporter commented 9 years ago
PlayPcmWin 4.0.28 contains Revision 2863 update

Original comment by yamamoto2002@gmail.com on 6 Jan 2013 at 11:10

GoogleCodeExporter commented 9 years ago

Original comment by yamamoto2002@gmail.com on 6 Jan 2013 at 6:22

GoogleCodeExporter commented 9 years ago
Hi ufoerp,

Improved quantization bit rate auto selection algorithm is implemented
on PlayPcmWin 4.0.29.
New autoselect algorithm tries 24bit format on 16bit pcm file playback
if 16bit format is not available.
Now you do not need to set 24bit integer format manually, just set
autoselect on detailed settings.

Original comment by yamamoto2002@gmail.com on 13 Jan 2013 at 9:08

GoogleCodeExporter commented 9 years ago
many thanks. great!!

Original comment by ufo...@gmail.com on 15 Jan 2013 at 3:10