SoAudioDevice(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– SoAudioDevice(3) πŸ’–

okay bestie, welcome to the Coin manual, and today's main character is SoAudioDevice. buckle up πŸŽ€


✨ NAME ✨

SoAudioDevice β€” the class that controls an audio device, fr fr πŸ”Š


🌸 SYNOPSIS 🌸

#include <Inventor/misc/SoAudioDevice.h>

🫢 Public Member Functions

SbBool init (const SbString &devicetype, const SbString &devicename)
SbBool enable ()
void disable ()
SbBool isEnabled ()
SbBool haveSound ()
void setGain (float gain)
void mute (SbBool mute=TRUE)

πŸ’… Static Public Member Functions

static SoAudioDevice * instance ()

πŸ¦‹ Detailed Description πŸ¦‹

so the SoAudioDevice class is used to control an audio device. that's the whole vibe.

SoAudioDevice is the one responsible for initialization of an audio device, plus enabling and disabling sound. and get this β€” it's a singleton class. one and only one, main character energy, periodt πŸ‘‘

here's the slay part: the application programmer does not need to use this class directly, because audio support is enabled by default and the default settings are reasonable. like, it just works. iconic.

Coin uses OpenAL (http://www.openal.org/, http://developer.soundblaster.com [Games section]) to render audio. OpenAL should work with any soundcard, and on most modern operating systems β€” including Unix, Linux, IRIX, *BSD, Mac OS X and Microsoft Windows. 2 speaker output is always available, and on some OS and soundcard combinations, more advanced speaker configurations are supported. on Microsoft Windows, OpenAL can use DirectSound3D to render audio, which means it supports any speaker configuration the current DirectSound3D driver supports. configuring speakers is done through the soundcard driver, and it's transparent to both Coin and OpenAL. no extra work for you, bestie ✨


πŸ’œ Member Function Documentation πŸ’œ

⭐ SoAudioDevice * SoAudioDevice::instance () [static]

returns a pointer to the SoAudioDevice class, which is a singleton. one pointer to rule them all πŸ’«

⭐ SbBool SoAudioDevice::init (const SbString & devicetype, const SbString & devicename)

initializes the audio device. currently, the only supported devicetype is "OpenAL". the supported devicename depends on the OS and on installed sound cards and drivers. on Microsoft Windows, supported device names are "DirectSound3D", "DirectSound", and "MMSYSTEM". see the OpenAL documentation (available from http://www.openal.org/) for further information. iykyk πŸ“–

the application programmer may override the default setting by calling this method with the wanted device type and name.

the user can also control which devicename OpenAL uses by setting the COIN_SOUND_DRIVER_NAME environment variable. on Microsoft Windows, the default driver name is "DirectSound3D", which should normally be what the user wants. no cap πŸ’―

⭐ SbBool SoAudioDevice::enable ()

enables sound πŸ”Šβœ¨

⭐ SbBool SoAudioDevice::disable ()

disables sound. effectively silencing all audio output. the mute button of your dreams 😭

⭐ SbBool SoAudioDevice::isEnabled ()

returns TRUE if audio is enabled.

⭐ SbBool SoAudioDevice::haveSound ()

returns true if the audio device has been initialized successfully. vibe check passed 🫢


πŸŽ€ Author πŸŽ€

generated automatically by Doxygen for Coin from the source code. the robots did this one πŸ€–πŸ’–


and that's the whole page bestie, you ate that πŸ’…

Version 4.0.10 β€” dated Thu Jun 25 2026 00:00:00 β€” brought to you by Coin, manual page SoAudioDevice(3). bye pookie, go make some noise 🌈🎧

πŸ“¦ where this page comes from