OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Data Structures | Typedefs | Functions
audiolib.pkg File Reference

Data Structures

struct  AudioPlayer
 AudioPlayer : player that can use both cAudio and FFmpeg as backends transparently ///. More...
 

Typedefs

typedef struct mkAudioPlayer AudioPlayer
 

Functions

 audioGetEffectByName (name)
 
 audioGetAvailableEffects ()
 
 audioGetAvailablePresets (name)
 
 audioPlayerCreate (name, loop, enableEffects, volume, pitch, stopCallback)
 
 audioPlayerCreate3d (name, loop, enableEffects, volume, pitch, stopCallback, object, attenuation, cone)
 
 audioPlayerSet3dSource (sndstr, object)
 
 audioPlayerSetAttenuation (sndstr, attenuation)
 
 audioPlayerSetCone (sndstr, cone)
 
 audioPlayerInternalStopCb (obj, sndstr)
 
 audioPlayerUpdate (sndstr)
 If the sound is a 3D sound, update its position according to the position of its source 3D object. When using FFmpeg, this function fills the cAudio buffer with raw audio data from FFmpeg. It should be called in pre-render callbacks.
 
 audioPlayerUpdateBuffer (sndstr, buff)
 
 audioPlayerInternalStop (sndstr)
 
 audioPlayerStop (sndstr)
 
 audioPlayerDelete (sndstr)
 
 audioPlayerPlay (sndstr)
 
 audioPlayerPause (sndstr)
 
 audioPlayerGetLength (sndstr)
 
 audioPlayerGetCurrentTime (sndstr)
 
 openSoundMediaPlayer (sndstr, path)
 
 openSoundCaudio (sndstr, path)
 
 audioPlayerSetVolume (sndstr, vol)
 
 audioPlayerSetPitch (sndstr, pitch)
 
 audioPlayerSeek (sndstr, offset)
 Seek relative to the current position in the sound. Note that seeking is not always supported by audio sources.
 
 audioPlayerEnableEffect (sndstr)
 
 audioPlayerDisableEffect (sndstr)
 
 audioPlayerOpenSound (sndstr, newSound)
 
 audioPlayerOpenBuffered (sndstr, samplerate, format)
 
 audioPlayerGetCurrentSound (sndstr)
 

Typedef Documentation

◆ AudioPlayer

typedef struct mkAudioPlayer AudioPlayer

Function Documentation

◆ audioGetEffectByName()

audioGetEffectByName ( name  )

◆ audioGetAvailableEffects()

audioGetAvailableEffects ( )

◆ audioGetAvailablePresets()

audioGetAvailablePresets ( name  )

◆ audioPlayerCreate()

audioPlayerCreate ( name  ,
loop  ,
enableEffects  ,
volume  ,
pitch  ,
stopCallback   
)

◆ audioPlayerCreate3d()

audioPlayerCreate3d ( name  ,
loop  ,
enableEffects  ,
volume  ,
pitch  ,
stopCallback  ,
object  ,
attenuation  ,
cone   
)

◆ audioPlayerSet3dSource()

audioPlayerSet3dSource ( sndstr  ,
object   
)

◆ audioPlayerSetAttenuation()

audioPlayerSetAttenuation ( sndstr  ,
attenuation   
)

◆ audioPlayerSetCone()

audioPlayerSetCone ( sndstr  ,
cone   
)

◆ audioPlayerInternalStopCb()

audioPlayerInternalStopCb ( obj  ,
sndstr   
)

◆ audioPlayerUpdate()

audioPlayerUpdate ( sndstr  )

If the sound is a 3D sound, update its position according to the position of its source 3D object. When using FFmpeg, this function fills the cAudio buffer with raw audio data from FFmpeg. It should be called in pre-render callbacks.

Parameters
sndstrAudioPlayer instance.
Returns
Nil if update wasn't performed (audio not playing / not using FFmpeg / other failure).

◆ audioPlayerUpdateBuffer()

audioPlayerUpdateBuffer ( sndstr  ,
buff   
)

◆ audioPlayerInternalStop()

audioPlayerInternalStop ( sndstr  )

◆ audioPlayerStop()

audioPlayerStop ( sndstr  )

◆ audioPlayerDelete()

audioPlayerDelete ( sndstr  )

◆ audioPlayerPlay()

audioPlayerPlay ( sndstr  )

◆ audioPlayerPause()

audioPlayerPause ( sndstr  )

◆ audioPlayerGetLength()

audioPlayerGetLength ( sndstr  )

◆ audioPlayerGetCurrentTime()

audioPlayerGetCurrentTime ( sndstr  )

◆ openSoundMediaPlayer()

openSoundMediaPlayer ( sndstr  ,
path   
)

◆ openSoundCaudio()

openSoundCaudio ( sndstr  ,
path   
)

◆ audioPlayerSetVolume()

audioPlayerSetVolume ( sndstr  ,
vol   
)

◆ audioPlayerSetPitch()

audioPlayerSetPitch ( sndstr  ,
pitch   
)

◆ audioPlayerSeek()

audioPlayerSeek ( sndstr  ,
offset   
)

Seek relative to the current position in the sound. Note that seeking is not always supported by audio sources.

Parameters
offsetAmount of time in seconds, relative to the current time.
Returns
Nil on failure.

◆ audioPlayerEnableEffect()

audioPlayerEnableEffect ( sndstr  )

◆ audioPlayerDisableEffect()

audioPlayerDisableEffect ( sndstr  )

◆ audioPlayerOpenSound()

audioPlayerOpenSound ( sndstr  ,
newSound   
)

◆ audioPlayerOpenBuffered()

audioPlayerOpenBuffered ( sndstr  ,
samplerate  ,
format   
)

◆ audioPlayerGetCurrentSound()

audioPlayerGetCurrentSound ( sndstr  )