Skip to content

Add audio::sound for managing sound operations #13

@SpinnerX

Description

@SpinnerX

Start by adding a sound object to manage its own sets of resources and APIs and using C++'s RAII to manage its own object destruction.

This will act as a wrapper around the miniaudio C API, using object-oriented design.

API Example

audio::sound test_sound("resources/elephant.wav");

test_sound.spatialization_enabled(p_bool);
test_sound.pinned_listener(uint32_t p_index);
test_sound.direction(float forward_x, float forward_y, float forward_z);
test_sound.attenuation_model(AL_INVERSE_DISTANCE_CLAMPED);
test_sound.position(float x, float y, float z);
test_sound.relative_position(ma_attenuation_model_inverse);
test_sound.fade(float p_vol_start, float p_vol_end, uint64_t p_fade_length);
test_sound.read_pcm_frames();

Expected Behavior

The expected behavior is to be able to communicate in a thread-safe manner and set parameters such as spatialization.

For more info, refer to this link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔋internalImplementing standalone tasks or perform code migration.

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions