0
0

Hello

I wonder if FMOD allows to switch between Inputs like mic and line in. I searched through this forum and I found one post reaching this topic, but it was posted seven years ago so I hope something has changed since than in this matter.

Beside switching I would like to be able to change volume on this inputs. Which would allow me to adjust record volume and mute mic in some parts of my program. I not know how to do this.

I would be appreciate for any help.

  • You must to post comments
0
0

Take a look at the recording example that comes with the API, it shows you how to enumerate the recording devices and choose which one to use.

  • You must to post comments
0
0

I’ve looked at this example long time ago. But as I understand there is only shown example how to chose recording devices but not the specific input like microphone or line-in.

Additionally when I used this example, FMOD_System_GetNumDrivers pointed me that my recording device is "1" but I have only one sound card and in order to record anything I had to set in FMOD_System_RecordStart id to "0".

So maybe I don’t understand something. Cloud you be more specific how to set input as microphone and after that change it to line-in using only API .

  • You must to post comments
0
0

The example has everything you need. Line-in and Microphone are record drivers which are enumerated by that example.

  • You must to post comments
0
0

In my situation record drivers shown by System_GetDriverInfo dosn’t point at Microphone or Line-in. This function shows only Sound Card.

My cod and results are shown bellow.

[code:3h1qicbt]result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_WINMM); // I tried also ASIO result is the same
ERRCHECK( result);

result=FMOD_System_Init(system, 100,FMOD_INIT_NORMAL, 0);
ERRCHECK( result);

int rnumdr;
result = FMOD_System_GetRecordNumDrivers(system,&rnumdr);
Memo1->Lines->Add("Number of device to record");
Memo1->Lines->Add(rnumdr);
char name[256];
int count;

for (count=0; count < rnumdr; count++)
{
char name[256];

    result = FMOD_System_GetDriverInfo(system, count, name, 256, 0);
    ERRCHECK(result);
            Memo1-&gt;Lines-&gt;Add(&quot;Index number of driver&quot;);
            Memo1-&gt;Lines-&gt;Add(count);
            Memo1-&gt;Lines-&gt;Add(&quot;Driver name&quot;);
            Memo1-&gt;Lines-&gt;Add(name);
    }

[/code:3h1qicbt]

This code results in such message shown in Memo1

[quote:3h1qicbt]
Number of device to record
1
Index number of driver
0
Driver Name
SoundMAX Digital Audio
[/quote:3h1qicbt]

I can only chose input by windows mixer but I would like to do this by Code. Is it possible ?

  • You must to post comments
0
0

System::getRecordDriverInfo

  • You must to post comments
0
0

thanks Peter for help and sorry for my stupid mistake I already changed it for getRecordDriverInfo.

But the results are the same. My present code is bellow

[code:3435xhcg] int rnumdr;
result = FMOD_System_GetRecordNumDrivers(system,&rnumdr);
Memo1->Lines->Add("Number of device to record");
Memo1->Lines->Add(rnumdr);
char name[256];
int count;

for (count=0; count < rnumdr; count++)
{
char name[256];

    result = FMOD_System_GetRecordDriverInfo(system, count, name, 256, 0);
    ERRCHECK(result);
            Memo1-&gt;Lines-&gt;Add(&quot;Index number of driver&quot;);
            Memo1-&gt;Lines-&gt;Add(count);
            Memo1-&gt;Lines-&gt;Add(&quot;Driver name&quot;);
            Memo1-&gt;Lines-&gt;Add(name);
    } 

[/code:3435xhcg]

results from memo1

[quote:3435xhcg]
Number of device to record
1
Index number of driver
0
Driver name
SoundMAX Digital Audio
[/quote:3435xhcg]

I tried it also on my laptop but there is windows 7 and there is only one physical input. The code is working fine because it shows me one recording device which is mic (on my laptop) . But on PC with windows XP where I am testing my program in my sound card there are two physical inputs one mic and line-in. And no mater which is chosen the result of lunching the code are the same (shown upper in quote area).

I was testing recording by switching inputs with windows mixer. When line-in is checked, I can only record from line-in. When mic is checked, only signals form mic input are recorded. So switching between inputs is possible and there must by some way to switch between those two inputs form code level, but I don’t know how. The solution shown in recording example isn’t enough here because according to FMOD I have only one recording device which is equal to one recording input as you explained me.

So is there something else which I can do ?

  • You must to post comments
0
0

It sounds like a system configuration issue. GetRecordNumDrivers should report all currently available recording drivers.

  • You must to post comments
0
0

With Windows XP, you must switch the input manually in your Windows audio control panel. FMOD is designed to recognize distinct devices as presented by the OS. When you choose your output mode, i.e. WINMM, DSOUND or WASAPI (for Vista / Win7) FMOD will display the devices that those modes know about.

On Windows 7 generally things like line-in and mic are presented as distinct devices so FMOD can address them directly, but XP generally doesn’t. You cannot switch it with FMOD, it may be possible to find driver software which exposes the components of your sound card as distinct devices, but this is only a guess.

  • You must to post comments
0
0

Thanks for answer, at least I won’t be wasting time for trying to do something which isn’t possible.

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.