Regarding BASSWMA

Started by engineeer, 29 Jul '03 - 13:11

engineeer

1. How to set buffer length and timeout for WMA? BASS_SetNetConfig doesn't affect WMA, right?
2. How often should I call BASS_WMA_EncodeWrite to encode and write data to the network if I want to broadcast file(s)? Playing muted (volume=0) stream and calling BASS_WMA_EncodeWrite within DSPPROC works fine, but...
How about something like STREAMPROC callback, where we can feed encoder with data when it needs ones?
3. Syncs on WMT_BUFFERING_START, WMT_BUFFERING_STOP, WMT_CONNECTING, WMT_LOCATING will be usefull for GUI stuff.

Ian @ un4seen

Quote1. How to set buffer length and timeout for WMA? BASS_SetNetConfig doesn't affect WMA, right?
Yep, the net connecting/buffering for WMA streams is performed by the Windows Media modules... I'm not sure that it's possible to specify buffer/timeout values. I'll have to check.
Quote2. How often should I call BASS_WMA_EncodeWrite to encode and write data to the network if I want to broadcast file(s)? Playing muted (volume=0) stream and calling BASS_WMA_EncodeWrite within DSPPROC works fine, but...
How about something like STREAMPROC callback, where we can feed encoder with data when it needs ones?
If you're looking to regulate the feeding of sample data (eg. from a decoding channel) to the encoder, you could use a timer... or create a thread which just writes and then sleeps, in a "while" loop?
Quote3. Syncs on WMT_BUFFERING_START, WMT_BUFFERING_STOP, WMT_CONNECTING, WMT_LOCATING will be usefull for GUI stuff.
The problem in the case of WMT_CONNECTING/WMT_LOCATING is there's no channel yet, to set the syncs on :)

Buffering syncs could be a possibility though. In the meantime, BASS_ChannelIsActive will return BASS_ACTIVE_STALLED when playback is stalled - that may be some use to you.

engineeer

QuoteI'm not sure that it's possible to specify buffer/timeout values. I'll have to check.
For timeout I'm not sure, but IWMReaderNetworkConfig::Get/SetBufferingTime methods could help with buffering?  ;)

QuoteIf you're looking to regulate the feeding of sample data (eg. from a decoding channel) to the encoder, you could use a timer... or create a thread which just writes and then sleeps, in a "while" loop?
Yep, this will work, but I got to avoid overfeeding.

QuoteThe problem in the case of WMT_CONNECTING/WMT_LOCATING is there's no channel yet, to set the syncs on  

Buffering syncs could be a possibility though. In the meantime, BASS_ChannelIsActive will return BASS_ACTIVE_STALLED when playback is stalled - that may be some use to you.
You're right (as always  ;) ), thanks!