Renamed 'ljud' to 'miniaudio' to better represent what engine it is.
This commit is contained in:
11
audio.odin
11
audio.odin
@@ -95,13 +95,12 @@ play_sound_at_position :: proc(ctx: ^Context, sound: ^Sound, bus: ^Bus, position
|
||||
}
|
||||
|
||||
sound_instance.spatialized = true // TEMP: SS - Hardcoded. Expose!
|
||||
sound_instance.loop = false // TEMP: SS - Hardcoded. Expose!
|
||||
sound_instance.volume = 1.0 // TEMP: SS - Hardcoded. Expose!
|
||||
sound_instance.position = position
|
||||
sound_instance.min_distance = 1.0 // TEMP: SS - Hardcoded. Expose!
|
||||
sound_instance.max_distance = 50.0 // TEMP: SS - Hardcoded. Expose!
|
||||
|
||||
log.infof("Got instance! Now we should 'start'/play it.")
|
||||
|
||||
if !engine.play_sound_instance(
|
||||
&ctx.engine,
|
||||
sound_instance
|
||||
@@ -113,11 +112,9 @@ play_sound_at_position :: proc(ctx: ^Context, sound: ^Sound, bus: ^Bus, position
|
||||
return sound_instance, true
|
||||
}
|
||||
|
||||
// sound_instance_playing :: proc(sound_instance: ^Sound_Instance) -> bool { // TODO: SS - Implement something like this.
|
||||
// assert(sound_instance != nil)
|
||||
|
||||
// return true // TEMP
|
||||
// }
|
||||
// TODO: SS - 'get_sound_instance_status(..)' that returns an enum for the state; not started, playing, stopped, done?
|
||||
// TODO: SS - 'stop_sound_instance(..)'
|
||||
// TODO: SS - 'update_sound_instance(..)' that allows us to, for example, move the sound; projectile moving, bird flying, coin swaying, etc.
|
||||
|
||||
update_listener :: proc(ctx: ^Context, listener: ^Listener, position, velocity, direction_forward, world_up: [3]f32) -> bool {
|
||||
assert(ctx != nil)
|
||||
|
||||
Reference in New Issue
Block a user