On Thursday 08 March 2018 16:25:13 fredvs wrote:
>
> Perfect, I did test and it works with wine too.
> Little bémol (very, very little), only resolution of integer 16 and float
> 32 are working for Windows (not integer 32).
>
from pcaudiolib src/windows.c:
"
HRESULT
CreateWaveFormat(enum audio_object_format format,
                 uint32_t rate,
                 uint8_t channels,
                 WAVEFORMATEX **wfmt)
{
        if (!wfmt)
                return E_INVALIDARG;

        switch (format)
        {
        case AUDIO_OBJECT_FORMAT_ALAW:      return 
CreateWaveFormatEx(WAVE_FORMAT_ALAW, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_ULAW:      return 
CreateWaveFormatEx(WAVE_FORMAT_MULAW, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S8:        return 
CreateWaveFormatEx(WAVE_FORMAT_PCM, 8, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S16LE:     return 
CreateWaveFormatEx(WAVE_FORMAT_PCM, 16, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_S32LE:     return 
CreateWaveFormatEx(WAVE_FORMAT_PCM, 32, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_FLOAT32LE: return 
CreateWaveFormatEx(WAVE_FORMAT_IEEE_FLOAT, 32, rate, channels, wfmt);
        case AUDIO_OBJECT_FORMAT_FLOAT64LE: return 
CreateWaveFormatEx(WAVE_FORMAT_IEEE_FLOAT, 64, rate, channels, wfmt);
        default:                            return E_INVALIDARG;
        }
}
"
It probably depends on the soundcard/driver which formats are supported.

> Some question...
>
> Do you have a idea what are audio_object_drain()

Waits until written audio data has been played.

> and audio_object_flush() 

Cancels all buffered audio data.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to