Ebobtron
23rd July 2006, 17:06
Hello,
While cleaning up some code in avsFilmCutter (http://forum.doom9.org/showthread.php?t=97438) I discovered the following.
When "ConvertAudioToFloat()" used in a script.
The following two methods report different things.
VideoInfo info = clip->GetVideoInfo();
(info.SampleType() == 16) or float 32
WAVEFORMATEX.wBitsPerSample == 16
WAVEFORMATEX.wFormatTag == WAVE_FORMAT_PCM
The resultant PCM output plays well in all player I have tried. I would think that a 32 bit float output would sound pretty bad if reported to a player as 16 bit. So I am assuming that the output is 16 bit PCM though I have not checked it for differences from a normal 16 bit sample of wave data.
Because WAVE_FORMAT_IEEE_FLOAT is a valid format tag, the question could be begged. What is the intended audio output when "ConvertAudioToFloat()" is used?
Or am I just confused again by what I see.
Seems I need to learn how search works.
* This version has had the automatic output ConvertAudioTo16Bit disabled
* to ease the testing of input of WAVE_FORMAT_IEEE_FLOAT type steams.
* Audio Sample type float will be output as WAVE_FORMAT_IEEE_FLOAT to
* the host application. None of the popular application can currently
* handle this stream type. Add a ConvertAudioTo16Bit() to the end of
* your script. This will be restored for the next release.
:o never mind :o
:thanks:
Ebobtron
While cleaning up some code in avsFilmCutter (http://forum.doom9.org/showthread.php?t=97438) I discovered the following.
When "ConvertAudioToFloat()" used in a script.
The following two methods report different things.
VideoInfo info = clip->GetVideoInfo();
(info.SampleType() == 16) or float 32
WAVEFORMATEX.wBitsPerSample == 16
WAVEFORMATEX.wFormatTag == WAVE_FORMAT_PCM
The resultant PCM output plays well in all player I have tried. I would think that a 32 bit float output would sound pretty bad if reported to a player as 16 bit. So I am assuming that the output is 16 bit PCM though I have not checked it for differences from a normal 16 bit sample of wave data.
Because WAVE_FORMAT_IEEE_FLOAT is a valid format tag, the question could be begged. What is the intended audio output when "ConvertAudioToFloat()" is used?
Or am I just confused again by what I see.
Seems I need to learn how search works.
* This version has had the automatic output ConvertAudioTo16Bit disabled
* to ease the testing of input of WAVE_FORMAT_IEEE_FLOAT type steams.
* Audio Sample type float will be output as WAVE_FORMAT_IEEE_FLOAT to
* the host application. None of the popular application can currently
* handle this stream type. Add a ConvertAudioTo16Bit() to the end of
* your script. This will be restored for the next release.
:o never mind :o
:thanks:
Ebobtron