Skip to content

SDL3: Some updates/implementations of audio methods#32

Open
scbafk wants to merge 1 commit into
zig-gamedev:mainfrom
scbafk:sdl3-audio-updates
Open

SDL3: Some updates/implementations of audio methods#32
scbafk wants to merge 1 commit into
zig-gamedev:mainfrom
scbafk:sdl3-audio-updates

Conversation

@scbafk
Copy link
Copy Markdown

@scbafk scbafk commented May 10, 2026

A return value is required when opening a default playback device:

    audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, NULL);
  • Modifies openAudioDevice to return Error!AudioDeviceId instead of Error!void

Null is allowed, figured I'd update this.

  • Modifies openAudioDeviceStream userdata parameter to be nullable

Some other methods I needed, figured I'd share them.

  • Implements createAudioStream, bindAudioStream, and loadWAV

…rror!void

- Modifies openAudioDeviceStream userdata parameter to be nullable
- Implements createAudioStream
- Implements bindAudioStream
- Implements loadWAV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant