19 Jun '13 - 22:46 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Sound device switch without restart?  (Read 498 times)
AlexII
Posts: 25


« on: 6 Dec '11 - 13:51 »
Reply with quoteQuote

Hi,

how can I sound device switch without application restart? It's for netradio example in Delphi.

Thx ))
Logged
ken
Posts: 630


« Reply #1 on: 6 Dec '11 - 14:42 »
Reply with quoteQuote

Sure, run BASS_Free then Run BASS_Init again with new parameters.

Logged
AlexII
Posts: 25


« Reply #2 on: 6 Dec '11 - 15:24 »
Reply with quoteQuote

But then the playback stops.
Logged
ken
Posts: 630


« Reply #3 on: 6 Dec '11 - 19:20 »
Reply with quoteQuote

But then the playback stops.

Take a look at BASS_SetDevice method, maybe that will solve your problem. I have not tested it myself.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #4 on: 7 Dec '11 - 15:06 »
Reply with quoteQuote

BASS_ChannelSetDevice is what you want, ie. move the stream to the newly initialized device before freeing the old device...

BASS_Init(newdevice, ...); // initialize the new device
BASS_ChannelSetDevice(stream, newdevice); // move the stream to it
BASS_SetDevice(olddevice); // set the thread's device context to the old device
BASS_Free(); // free the old device
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines