google-code-export / bitspersampleconv2

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

about playwinpcm behavior of WASAPI exclisive mode and WASAPI shared mode #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there creators of PlayWindowPCM (pwp), what a wonder full peace of software. 
I run it on a ASUS i7 with w7/64 and HD soundcard (obvious).  Its such a 
pleasure for the ear! Now my situation. because I could not get the 32 bit 
setting to work in exclusive mode I switched to shared and event driven. I than 
select play and what happened is that, after a while, PWP turned playing, 
according to the remark in the lower left corner at 192kHz and 32 bit fp. Whow! 
do you know how that sounds? Music definitely comes to live!! Now there is a 
little set back being the time used for re-sampling. It can take up as long as 
10 min for a classical part of say 20 min music playback time.  So my question 
is 1. why is it not possible in exlusive mode to run 192/32 fp (the system 
seems to possible to do it) and 2. what to do with the long re-sampling time in 
shared mode. And last what is a good FMT setting. Please advice, and keep up 
the great work.

Humphrey

Original issue reported on code.google.com by humphrey...@gmail.com on 21 Nov 2013 at 5:44

GoogleCodeExporter commented 9 years ago
Hi  humphreydeklerk,

1.
WASAPI exclusive binary32 (IEEE754 32bit single precision floating point 
format) capable audio device is hard to find.
I have only one exclusive binary32 capable USB audio device, that is Musiland 
Monitor 02 US Dragon.
What audio device do you have ?

2. In WASAPI shared mode, sample rate is fixed to sound settings of control 
panel and music player must send binary32 PCM. PPW converts all PCM data to 
shared mode format before playback starts so it takes long time. Setting shared 
mode sampling rate to 192kHz significantly reduces resampling time of 192kHz 
file.
control panel - sound - select playback tab - select the audio device and click 
properties button - select Advanced tab - select 192kHz 24bit from default 
format  

Original comment by yamamoto2002@gmail.com on 22 Nov 2013 at 4:35

GoogleCodeExporter commented 9 years ago
Hi Yamamoto,

Thnx's for your response. The audio system is realtek hd audio running
6.0.1.6662 driver and was set to 192kHz 24bits Int.. This is the list for
supported formats generated by PWP.

|| 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 ||
++-------------++-------------++-------------++-------------++-------------++---
----------++-------------++-------------++

Now as I have told before, the remark in de down left corner in shared mode
clearly states: 192 kHZ 32 bits fpp playing mode ?

Please advice

Met vriendelijke groet,

Humphrey F.M.C. de Klerk
mobiel 06 12817530

Original comment by humphrey...@gmail.com on 26 Nov 2013 at 9:45

GoogleCodeExporter commented 9 years ago
Hi Humphrey,

This is a bit complicated matter and need a bit long sentence to explain

WASAPI shared mode: WASAPI accepts only 32bit float format. PPW reads PCM from 
file and convert to 32bit float on shared mode playback. Samplerate is fixed to 
Windows sound settings value and not allowed to be changed by application 
therefore PPW resamples original PCM data to shared mode samplerate using 
samplerate converter on WASAPI shared mode.

WASAPI exclusive mode: Application can change device sample rate and bit depth. 
Available PCM format list is defined by device driver and a combination of 
supported PCM types varies from device to device.
Typical audio device supports 44.1kHz/16bit, 44.1kHz/24bit, 48kHz/16bit, 
48kHz/24bit, 96kHz/16bit, 96kHz/24bit, 192kHz/16bit and 192kHz/24bit. (these 
are signed integer format)
Some other devices accepts 44.1kHz/16bit, 44.1kHz/24bit, 48kHz/16bit, 
48kHz/24bit, 88.2kHz/16bit, 88.2kHz/24bit, 96kHz/16bit, 96kHz/24bit, 
176kHz/16bit, 176kHz/24bit, 192kHz/16bit and 192kHz/24bit.
PCI express audio devices (includes onboard codec chip like Realtek or CMedia) 
uses 32bit integer container (that contains 24bit signed integer PCM and 8bit 
zeroes) for 24bit PCM.
But device driver that accepts 32bit float PCM on WASAPI Exclusive mode is very 
rare and hard to find.
On PPW, playback fails if desirable samplerate is not available in WASAPI 
exclusive mode.
Here is supported PCM format list of various devices:
http://code.google.com/p/bitspersampleconv2/wiki/WasapiExclusiveMode

So, on WASAPI shared mode, if PPW status bar displays 192kHz 32bit float on 
shared mode, your WASAPI shared samplerate in Windows control panel is set to 
192kHz. 32bit float format is only format used in shared mode, so it is normal. 
But it does not mean your device accepts 32bit float format on WASAPI exclusive 
mode.
In fact, your supported format list displays NA 
88890008(AUDCLNT_E_UNSUPPORTED_FORMAT) on all 32bit float formats. That means 
this device driver does not accept 32bit float format on WASAPI exclusive mode.

Original comment by yamamoto2002@gmail.com on 26 Nov 2013 at 12:55

GoogleCodeExporter commented 9 years ago
Hi Yamamoto, Thnx for your elaborated answer, Al is clear to me now. Once
again, keep up the great work!

Met vriendelijke groet,

Humphrey F.M.C. de Klerk
mobiel 06 12817530

Original comment by humphrey...@gmail.com on 27 Nov 2013 at 12:31

GoogleCodeExporter commented 9 years ago
Hi Humphey,

Thanks for reading my lengthy post!

Regards,
yamamoto2002

Original comment by yamamoto2002@gmail.com on 27 Nov 2013 at 12:45