Hi,
I’m developing a sort of internet radio application, using bass libraries.
It essentially plays a list of audio files, converting them in mp3 128 Kb, and send the stream to an icecast server
All is working fine on OS X, but i need a Windows version too, but I’m blocked on a callback issue:
Now, when playing a BASS channel ( a file opened and streamed), you can set a ‘SYNC’ for it, that’s a way to call a method when an event occurs ( in my case, when a file has finished playing ), something like this:
synccorrente2 = BASS_ChannelSetSync(audiocorrente2, BASS_SYNC_END, 0, AddressOf aggiungiPlayer1, 0)
as I said in OS X it works, and my method ( aggiungiPlayer1 ) is called, and after an audio has finished I can start the next, but on windows the app simply crashes.
in my method I have put at the beginning
#Pragma X86CallingConvention StdCall
#pragma stackOverflowChecking false
#pragma DisableBackgroundTasks
I have removed all the code from it ( now it simply sets a global variable, and a timer takes care to start the following audio )
I have moved it from a module method to a window method, but no success… it crashes on windows, the first audio file starts playing and the streaming to icecast works fine, but when it finishes it crashes…
any suggestions?
I have seen an old post about a similar problem, but it seems without solutions, somebody was talking about postin a message to the window using windows declares, but I have not clear how to do it…
Should external dll callbacks work on windows or not?
thanks,
Giulio