>From looking at the RA renderer code that this comment
refers to, it looks like that the workaround is no longer
needed.

>From the comment, it appears that the RA renderer used to
only call IHXAudioStream::Init() on the first substream when
a SureStream (multi-rate) stream was played. Then, as it received
packets for other substreams, then it created and Init'd those
IHXAudioStreams.

However, the current RA renderer creates and Init's an IHXAudioStream
for each substream. So it would appear that this workaround is
no longer needed.

However, this does raise this question: it doesn't appear that the
MDF audio device is handling the case when the CHXAudioSession opens
it with a format it did not expect. I would assume what happens
in the case you are describing it this:

- MDF audio renderer is playing a mono stream, so it opens its DSP
  decoder at mono, which results in the MDF audio device getting
  opened at mono. Is this correct?
- Then, the CHXAudioSession opens the MDF audio device as stereo.
  How is the MDF audio device handling this? Is it ignoring the
  format that the CHXAudioSession opens it with?

Eric

=======================================
Eric Hyche ([EMAIL PROTECTED])
Principal Engineer
RealNetworks, Inc.


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
>[EMAIL PROTECTED]
>Sent: Wednesday, October 29, 2008 5:34 PM
>To: [email protected]; [EMAIL PROTECTED]
>Subject: [Audio-dev] Discrepancy in channel count
>
>       Hi
>
>       Below mentioned code works fine with ARM/Software decoder but not with 
> DSP decoder
>
>       File: \client\audiosvc\hxaudply.cpp
>       Function: HX_RESULT CHXAudioPlayer::Setup( ULONG32 ulGranularity)
>
>               // keep min. channel at stereo
>               // this is a workaround for b#205546, the root cause of this is 
> that we only
>               // choose the audio format of the 1st audio stream when the 
> playback is started
>               // without audio, then audio clip is started at later time. For 
> sure stream audio,
>               // the first audio stream is often the lowest quality, thus the 
> audio device is
>               // configured to play the lowest quality audio.
>               //
>               // proper fix requires the audio device is setup only after all 
> audio streams
>               // assoicated with the same clip have been registered
>               m_PlayerFmt.uChannels           = (maxChannels < 2) ? 2 : 
> maxChannels;
>
>       Prob with DSP - If we calculate channel count as above [which makes 
> channel count as 2], then
>call to HX_RESULT CHXAudioSession::CreatePlaybackBuffer() doubles the size of 
>the session buffer
>[m_pSessionBuf] as its based on channel count. Then call to HX_RESULT 
>CHXMDFAudioDevice::Write(const
>HXAudioData* pHXAudioData) keeps adding filler (silence) frames in between 
>resulting into silence and
>breaks in audio play-back.
>
>       If we don't apply above work-around, and revert back to normal. i.e.:
>               m_PlayerFmt.uChannels           = maxChannels;
>       then audio play-back works fine.
>
>       So, how do we take care of above mentioned workaround for DSP?
>
>       Regards
>       Asheesh
>



_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to