Opened 15 years ago
Closed 13 years ago
#5093 closed bug (fixed)
[patch] BPushGameSound is not working correctly...
Reported by: | bmkx | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Game Kit | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
...and this is why I think they completely disabled sound in BeVICE (www.viceteam.org) under Haiku for now. I'm posting two patches I came up with after some digging in the code. First one is pretty obvious and only fixes some oversights. The second one is rather a proposal that maybe needs some more explanation. I'll post soon on developer mailing list.
Attachments (3)
Change History (19)
by , 15 years ago
Attachment: | PushGameSound.patch added |
---|
comment:1 by , 15 years ago
The second patch breaks binary compatibility; you cannot replace an existing method of a public API.
From a first glance, the first patch looks good. Is there any test program for the BPushGameSound? If not, we should definitely add one to our repository.
comment:4 by , 15 years ago
I've added console app for testing playback with BPushGameSound. It uses BMediaTrack to provide some raw audio data. One can also test different values for frames per buffer part and buffer parts, these can be passed as optional parameters.
comment:5 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Thanks! I'll look into it tomorrow.
comment:6 by , 15 years ago
Your patch has a few issues like unsafe access to a shared member (fPlayPos). The test application seems to have issues as well, though. Don't have time today anymore.
Also, the media server obviously needs to be restarted after each run, or else the BGameSoundDevice will fail to initialize. This is not related, I just wanted to mention it.
I will look into those issues in the next days.
comment:7 by , 15 years ago
You mean there: fPlayPos += bytes; fPlayPos %= fBufferSize; yes? :)
Just a note: I don't need to restart media server, it plays each time just fine. Still using a1r1 though. There's an issue with test application when run on system w/o available audio output, it stalls on BGameSoundDevice's StartPlayback, AFAIR.
comment:8 by , 15 years ago
Summary: | BPushGameSound is not working correctly... → [patch] BPushGameSound is not working correctly... |
---|
comment:9 by , 15 years ago
patch: | → 1 |
---|
comment:12 by , 14 years ago
Not from me, if that's what you ask. I'm not using Haiku for over half a year now. But the whole issue shouldn't be a problem for one of core developers to fix it, in a cleaner way than the provided second patch. It's probably just a matter of finding some free time to do it :)
comment:13 by , 14 years ago
I had started to work on this a while back, but ran into some problems. I don't really remember what it was, but I still have the uncommitted stuff here. I guess I should have a second look at that some day.
comment:15 by , 13 years ago
Applied a modified version of the first patch in hrev43064. Looking at the other one now, but at least it doesn't crash anymore.
comment:16 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
And other patch applied in hrev43128. It at least improves the situation.
Small fixes for BPushGameSound