SoAudioDevice(3)
πΈ SoAudioDevice πΈ
okay bestie, gather round β this is the manual page for SoAudioDevice(3) from the Coin library, and yes it's a C++ class, and yes we're gonna make it make sense. π
β¨ NAME β¨
SoAudioDevice β the class that's literally in charge of controlling an audio device. that's it, that's the job. π§
π SYNOPSIS π
First things first, you gotta pull in the header:
#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=1)
void cleanup ()
β Static Public Member Functions
static SoAudioDevice * instance ()
π§ Friends
class SoAudioDeviceP
π Detailed Description π
so what is this thing actually doing β the SoAudioDevice class is used to control an audio device.
It's the one holding down the whole operation: it handles initialization of an audio device, and it also handles enabling and disabling sound. It's a singleton class, which is a fancy way of saying there's exactly one of it and it's the main character. π
Now here's the tea bestie: the application programmer does not need to use this class directly, because audio support is enabled by default and the default settings are reasonable. so like, you can just vibe and it works. no cap.
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 happens through the soundcard driver, and it's transparent to both Coin and OpenAL. slay, honestly β¨
π¦ Member Function Documentation π¦
π« SoAudioDevice * SoAudioDevice::instance () [static]
Returns a pointer to the SoAudioDevice class, which is a singleton. one class, one pointer, one destiny fr fr. π
Referenced bySoVRMLSound::audioRender(),SoSceneManager::render(),SoVRMLAudioClip::SoVRMLAudioClip(), andSoVRMLSound::SoVRMLSound().
π« SbBool SoAudioDevice::init (const SbString & devicetype, const SbString & devicename)
Initializes the audio device. heads up: currently, the only supported devicetype is "OpenAL". The supported devicename depends on the OS and on installed soundcards 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. π
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.
Referencesdisable(),SbString::getString(),haveSound(),SoDebugError::postInfo(), andSoDebugError::postWarning().
π« SbBool SoAudioDevice::enable ()
Enables sound π β turn it up bestie.
References haveSound().
π« void SoAudioDevice::disable ()
Disables sound. Effectively silencing all audio output. π€« shhh, we're being quiet now.
ReferenceshaveSound(). Referenced byinit().
π« SbBool SoAudioDevice::isEnabled ()
Returns TRUE if audio is enabled. simple as that, iconic behaviour. β
π« SbBool SoAudioDevice::haveSound ()
returns true if the audio device has been initialized successfully. lowercase true, we're keeping it exactly as written, don't come for me π
Referenced bydisable(),enable(), andinit().
π« void SoAudioDevice::cleanup ()
Cleans up any allocated resources.
NOTE: now obsoleted, don't use this. Clean-up is triggered from theatexitscheme in"tidbits". like genuinely, do not use it. it's giving deprecated. we said what we said. π
References SoDebugError::post().
π Author π
Generated automatically by Doxygen for Coin from the source code. yes the robots wrote it, we're just here to make it cute π€π
and that's the whole page bestie, you ate it up π
this little love letter to SoAudioDevice(3) came to you courtesy of Coin, Version 2.5.0 β iykyk. go make some noise. πβ¨π¦
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms