views:

11

answers:

0

The application I'm using only plays sounds after enough sound has been generated. Say I click the mouse 10 times, with no sound, and then after those ten clicks I'll hear ten mouse click sounds (for example)

The only way I've found to alleviate this problem is to set a very short buffer size, which I don't want to do.

I've been trying to use the start_threshold sw parameter but that has no effect.

It seems like I should be able to force it to play when a specified amount of data has been written that is under buffer size, is this correct? That's what start_threshold seems to indicate, since the period length can be much shorter than the buffer (or so I've seen in examples).

My code is like this:

Call HW parameter setup

get a byte array with data

loop through and write to the buffer plus one byte offset each time

call start (this should force it to play back, right??)

if there is -EPIPE, call prepare and add 0 to offset (I think this is the only time when things get played.)

Thanks!