0
0

Hi. I never got anybody feedback for the following message. Can somebody help me? This thread is chronologically increasing(ie. the last part is my actual question). Thank You.

— original thread —


(Me)
Hi.

I have to feed a usb plugged-in steering mechanism raw pcm data. Can I do this through FMOD? Any hints on how to do this?

Thanks,
Matt


(FMod Gods)
I would probably recommend a user created stream. There is an example for this in ‘usercreatedsound’ example.


(Me)
Cool. I think I understand through this example how the stream is getting updated.

For the output to our steering-wheel peripheral(as opposed to the main soundcard), do I just call system::setDriver in order to switch to this steering-wheel device?

Also, the data going to the steering-wheel device needs to be updated real-time for our purposes. This seems in contrast with the ‘usercreatedsound’ example as there is a finite-sized buffer that seems to stop updating after a few iterations. Would we want to make a double-buffer for our needs?

Also, in this example is the pcm-filling-callback asynchronous or synchronous.

Thank You.
Matt

  • You must to post comments
0
0

It doesnt stop feeding after a few iterations. Just make your user created stream a loop and it will continually feed until you tell it to stop.

  • You must to post comments
0
0

I just noticed that setDriver can only be called BEFORE FMOD_System_Init.

Our app calls for us to feed a steering peripheral raw-PCM data every frame. We also obviously need to play sound/music.

If we can’t switch the devices from steering peripheral to primary sound driver then we have a problem.

Is there a way around this or maybe I’m doing something wrong here?

Thanks,
Matt

  • You must to post comments
0
0

This is correct, you can’t switch a major thing like the underlying sound device once the system is running.

If you want to use 2 devices, i recommend maybe creating 2 system objects, then switching your data between 2 custom streams.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.