Well, it works ! 😀
Of course 128 values is quite a small number, but Datas are arriving into memory after having been calculated by 128 blocks and it’s a 1Khz sound, so I have to oversample it to 11,025Khz in order to use fmod, but it seems to work. So i’ll try to extend it to 1024…
hum, well, my buffer (512 int now) is updated every 0,5 seconds now, and I want to play the new buffer just after having finished the other. But FSOUND_Stream_Open() acces time involve a small “bip” between two buffer reading.
Is there a mean to update the FSOUND_Stream and replay it without using FSOUND_CLOSE() + FOUND_OPEN() ?
Well, is there a special Price for [b:22o0vwen]very small companies[/b:22o0vwen] using fmod ?
well, I’ve got a problem using :
[code:2hc9wesu] stream = FSOUND_Stream_Create(streamcallback, 6*2048, FSOUND_NORMAL | FSOUND_16BITS | FSOUND_STEREO, 44100, 12345);
signed char F_CALLBACKAPI CAudio::streamcallback(FSOUND_STREAM *stream, void *buff, int len, int param)
In C++, it can’t convert the first parameter from signed char to signed char (__stdcall*)…
This is a C++ problem when attempting to pass a method as a callback when a static method is required.
The issue is that the ‘this’ ptr which identifies the CAudio instance
is required to resolve the C++ stream callback method. You can replace
this with a static method : C like function and pass it in.
Or there are articles on codeproject and other sites regarding callback
adapters/wrappers which allow you to implement a solution so you can use C++ methods where callbacks are required.
Well, I’m quite annoyed.
It works with a static function, but I can’t pass it my Tab which is a-non static int* (member variable).
I tried to pass a static Table, but i doesn’t work : Compliation + linking Ok, but “Memory can’t be Written”…
Please login first to submit.