controlling_20the_20audio_20mixer
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
controlling_20the_20audio_20mixer [2018/03/31 13:19] – external edit 127.0.0.1 | controlling_20the_20audio_20mixer [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Controlling the audio mixer===== | =====Controlling the audio mixer===== | ||
- | //by Richard Russell, July 2007//\\ \\ **Note: On Windows Vista and Windows 7 each running application has its own independent audio mixer. The code listed here will work correctly, but the mixer controlled is that for the specific application.**\\ \\ The main //BBC BASIC for Windows// help documentation describes [[http:// | + | //by Richard Russell, July 2007//\\ \\ **Note: On Windows Vista and Windows 7 each running application has its own independent audio mixer. The code listed here will work correctly, but the mixer controlled is that for the specific application.**\\ \\ The main //BBC BASIC for Windows// help documentation describes [[http:// |
+ | |||
+ | <code bb4w> | ||
ok% = FN_mixerset(Dest%, | ok% = FN_mixerset(Dest%, | ||
- | The routine returns TRUE if the control was set successfully and FALSE if not.\\ \\ The parameters are as follows:\\ \\ | + | </ |
+ | |||
+ | The routine returns TRUE if the control was set successfully and FALSE if not.\\ \\ The parameters are as follows: | ||
* **" | * **" | ||
Line 9: | Line 13: | ||
* **" | * **" | ||
* **" | * **" | ||
- | \\ | + | |
+ | For other possible values consult the Microsoft documentation.\\ \\ So for example to set the **Microphone recording level** to midrange you could use code like this: | ||
+ | |||
+ | <code bb4w> | ||
ok% = FN_mixerset(7, | ok% = FN_mixerset(7, | ||
- | To set the **CD Player output volume** to one-quarter: | + | </ |
+ | |||
+ | To set the **CD Player output volume** to one-quarter: | ||
+ | |||
+ | <code bb4w> | ||
ok% = FN_mixerset(4, | ok% = FN_mixerset(4, | ||
- | To mute the **Line input**:\\ \\ | + | </ |
+ | |||
+ | To mute the **Line input**: | ||
+ | |||
+ | <code bb4w> | ||
ok% = FN_mixerset(4, | ok% = FN_mixerset(4, | ||
- | To set a **Master Volume** control (which does not have a specific source) set the **" | + | </ |
+ | |||
+ | To set a **Master Volume** control (which does not have a specific source) set the **" | ||
+ | |||
+ | <code bb4w> | ||
ok% = FN_mixerset(4, | ok% = FN_mixerset(4, | ||
- | Finally here is the code for **FN_mixerset** itself:\\ \\ | + | </ |
+ | |||
+ | Finally here is the code for **FN_mixerset** itself: | ||
+ | |||
+ | <code bb4w> | ||
DEF FN_mixerset(dest%, | DEF FN_mixerset(dest%, | ||
LOCAL hmx%, res%, ndevs%, dev%, src%, ok%, MixerLine{} | LOCAL hmx%, res%, ndevs%, dev%, src%, ok%, MixerLine{} | ||
Line 105: | Line 128: | ||
IF res% ERROR 100, " | IF res% ERROR 100, " | ||
= TRUE | = TRUE | ||
+ | </ |
controlling_20the_20audio_20mixer.1522502350.txt.gz · Last modified: 2024/01/05 00:18 (external edit)