FS#11758 - lock the audio buffer with a mutex and minimise its direct use

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Sunday, 14 November 2010, 00:44 GMT
Last edited by Jonathan Gordon (jdgordon) - Sunday, 18 September 2011, 07:39 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


things shouldnt use audiobuf directly, so this patch works to get rid of that.

buffer_claim() is used to lock the buffer and _unclaim() is to release it. I put a panic in buffer_alloc() when it is unclaimed but that caused problems because untill audio starts nothing really claims the buffer, so we need to work out how to make his actually work.

Right now only playback.c mp3data.c and talk.c still use audiobuf directly (which needs to be changed)

not really sure how far to take this.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Sunday, 18 September 2011, 07:39 GMT
Reason for closing:  Out of Date