I think the best place to look for an example on how to record from a specific audio device is the record_enumeration Core API example available in the FMOD Engine download.
To output a channel on a specific speaker you can use Channel.setMixLevelsOutput
. The best place for an example on how to use this is the multiple_speaker Core API example, also available in the FMOD Engine download.
These examples are all in C++, but if you are only familiar with C# then you can read it approximately with the following guidelines:
- Ignore any
*
- Replace
&
without
- Replace
::
or->
with a.
operator - Replace
nullptr
withIntPtr.Zero
- For example:
//C++
struct RECORD_STATE
{
FMOD::Sound *sound;
FMOD::Channel *channel;
};
//C#
struct RECORD_STATE
{
FMOD.Sound sound;
FMOD.Channel channel;
};
//C++
result = system->createSound("mySound.wav", FMOD_LOOP_NORMAL | FMOD_OPENUSER, nullptr, &sound);
//C#
result = system.createSound("mySound.wav", FMOD_LOOP_NORMAL | FMOD_OPENUSER, IntPtr.Zero, out sound);