Author Topic: How to change the buffer ??  (Read 457 times)

terry_zhou82

  • Posts: 44
How to change the buffer ??
« on: 6 Jul '19 - 10:33 »
hi,
I use the bass.dll to play the net radio.but I don't find the option of changing the buffer time ? can you tell me admin ?

terry_zhou82

  • Posts: 44
Re: How to change the buffer ??
« Reply #1 on: 6 Jul '19 - 14:26 »
Through the help file. I found two ways to change the buffer
1.
 
BASS_SetConfig(
    BASS_CONFIG_BUFFER,
    DWORD length
);

2.
BASS_ChannelSetAttribute(
    DWORD handle,
    BASS_ATTRIB_BUFFER,
    float buffer
);

which the different from the twos ?

if I use the 2. it's always show the error --- BASS_ATTRIB_BUFFER  // undefinition

Ian @ un4seen

  • Administrator
  • Posts: 22813
Re: How to change the buffer ??
« Reply #2 on: 8 Jul '19 - 12:24 »
Those 2 options change the playback buffer size. Please see the BASS_ATTRIB_BUFFER documentation for how the options relate. The BASS_ATTRIB_BUFFER option was added in BASS 2.4.13, so make sure you have at least that version.

From the mention of "net radio", it sounds like you may actually want to change the download buffer size instead? If so, the BASS_CONFIG_NET_BUFFER option can be used to do that (before stream creation).

terry_zhou82

  • Posts: 44
Re: How to change the buffer ??
« Reply #3 on: 9 Jul '19 - 13:11 »
tks,guy. ;D