Sonix - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Sonix

Description:

VR Juggler application usage. Goal. Be able to add sound to VR Juggler applications ... Simple usage, stays out of the way. Access to spatialized audio and triggering ... – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 20
Provided by: bob4147
Category:
Tags: sonix | stays

less

Transcript and Presenter's Notes

Title: Sonix


1
Sonix
  • VR Juggler Sound Manager

2
Overview
  • Why use audio
  • Introduction of sonix
  • Standalone usage
  • VR Juggler application usage
  • Goal
  • Be able to add sound to VR Juggler applications

3
Audio Introduction
  • The benefits of using audio
  • Takes no screen space
  • Works well with background processes
  • Humans process audio in parallel with visual
    information
  • Human focus works well
  • Audio channel is available.
  • Key More immersive

4
Sonix
  • Provides simple audio objects for playing sounds
    using one of several audio APIs
  • Features
  • Simple API
  • Short learning curve
  • Simple usage, stays out of the way
  • Access to spatialized audio and triggering
  • Supports features needed for virtual environments
  • Spatialized or ambient sounds
  • One-shot and looping sounds
  • Supports runtime reconfigurability

5
SonixSystem
  • System
  • Handle
  • Sound info
  • API plugins

6
Using Sonix
  • Basic steps
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step function

7
Using Sonix
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource snxSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
simulate running application while (1)
float time_delta(getTimeChangeInSeconds())
sonixinstance()-gtstep(time_delta)
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step func

8
Using Sonix
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource snxSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
simulate running application while (1)
float time_delta(getTimeChangeInSeconds())
sonixinstance()-gtstep(time_delta)
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step func

9
Using Sonix
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource snxSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
simulate running application while (1)
float time_delta(getTimeChangeInSeconds())
sonixinstance()-gtstep(time_delta)
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step func

10
Using Sonix
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource snxSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
simulate running application while (1)
float time_delta(getTimeChangeInSeconds())
sonixinstance()-gtstep(time_delta)
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step func

11
Using Sonix
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource snxSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
simulate running application while (1)
float time_delta(getTimeChangeInSeconds())
sonixinstance()-gtstep(time_delta)
  • Set sound API
  • Configure sound info
  • Initialize sound handle
  • Trigger sound
  • Call time step func

12
Reconfiguration
  • Example uses
  • Change sound API being used
  • Disable sounds
  • Benefits
  • Portability of application
  • Enforces decoupling in implementation

13
Reconfiguration example
include ltsnx/sonix.hgt int main (int argc, char
argv) // Start API (set to OpenAL)
sonixinstance()-gtchangeAPI("OpenAL") //
Setup sound description for our sound
snxSoundInfo si si.filename "sound.wav"
si.datasource xnsSoundInfoFILESYSTEM
// Create sound handle object snxSoundHandle
mySound("MySound") mySound.configure(si)
// Trigger the sound mySound.trigger() //
Switch API sonixinstance()-gtchangeAPI(Audiow
orks") // simulate running application
while (1) float time_delta(getTimeChangeInSec
onds()) sonixinstance()-gtstep(time_delta)
  • Single call to system controller
  • Already used in every application

14
Sound Manager
  • Capabilities
  • Integrates sonix control with VR Juggler kernel
  • User can configure sounds in config file
  • Still allows full sonix API, but simplifies
    common usages

15
Configuring Sound Manager
16
Sound Manager Example
class myApp public vrjGlApp void
init() mSound.init(bump)
mButton0.init(VJButton0) void
preFrame() if(mButton0-gtgetData()
gadgetDigitalON) mSound.trigger()
snxSoundHandle mSound
gadgetDigitalInterface mButton0
  • Initialize sound handle
  • Trigger sound

17
Sound Manager Example
class myApp public vrjGlApp void
init() mSound.init(bump)
mButton0.init(VJButton0) void
preFrame() if(mButton0-gtgetData()
gadgetDigitalON) mSound.trigger()
snxSoundHandle mSound
gadgetDigitalInterface mButton0
  • Initialize sound handle
  • Trigger sound

18
Demo
  • Example of sonix VR Juggler application

19
Thats all there is to it
  • Questions???
  • Give it a try and let us know what you think
  • Documentation
  • http//www.vrjuggler.org/sonix/docs.php
  • Future work
  • Support for more sound APIs
  • Great place to contribute to project (hint, hint
    )
Write a Comment
User Comments (0)
About PowerShow.com