openframeworks / openframeworks/openFrameworks

ofOpenALSoundPlayer fails to load previously unloaded sound file

Open
#3,386 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core section-sound
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I was making a sound app that loads and unloads sounds for the Raspberry Pi when I noticed this error being thrown once I unload and try to load the same sound file again:

[notice ] ofApp: Creating new player at 0.001927

...Here the sound is being played for 2 seconds and once it stops, it is being unloaded and then loaded in again...

[notice ] ofApp: Removing player at 2.8134
[notice ] ofApp: Creating new player at 2.81569
[ error ] ofOpenALSoundPlayer: loadSound(): couldn't create stereo buffers for "/home/pi/openFrameworks/apps/myApps/ALSoundPlayerBug/bin/data/sound.wav": 40964 AL_INVALID_OPERATION

Added a git repo with an example here: https://github.com/kr15h/ALSoundPlayerBug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ofOpenALSoundPlayer loadSound() path and reproduce the unload-then-reload sequence using the linked ALSoundPlayerBug example on Raspberry Pi. Done means the same sound file can be unloaded and loaded again without the AL_INVALID_OPERATION error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, raspberry-pi
Domain
audio-video-rtc, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.