Author Topic: Regarding BASSWMA  (Read 3939 times)

engineeer

  • Posts: 86
Regarding BASSWMA
« on: 29 Jul '03 - 13:11 »
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

  • Administrator
  • Posts: 23386
Re: Regarding BASSWMA
« Reply #1 on: 29 Jul '03 - 23:09 »
Quote
1. 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.
Quote
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?

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?
Quote
3. 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

  • Posts: 86
Re: Regarding BASSWMA
« Reply #2 on: 30 Jul '03 - 09:33 »
Quote
I'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?  ;)

Quote
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?

Yep, this will work, but I got to avoid overfeeding.

Quote
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.

You're right (as always  ;) ), thanks!