Delay before sounds played
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 611
- Forks
- 211
- PR merge metrics
- No merged PRs in 30d
Description
When playing a sound (wav and ogg) from the 'sounds' directory using:
`sounds.soundname.play()`
there is a noticeable delay (.5 sec) before the sound is played.
This also happens in Pygame when using:
```
effect = pygame.mixer.Sound('sounds/soundname.wav')
effect.play()
```
With Pygame the delay is removed by using:
```
pygame.mixer.pre_init(22050, -16, 1, 256)
pygame.mixer.init()
```
before pygame.init()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the sounds.soundname.play entry point and how the framework initializes Pygame's mixer. Compare that setup with the pygame.mixer.pre_init and pygame.mixer.init sequence shown in the report. Done means WAV and OGG playback no longer has the reported half-second delay, with sound playback still working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100