I am trying to find an efficient fifo queue for primitive types. I need this for processing recorded samples with AudioRecord class. My problem is that I need to process the samples in excactly 5000 chunks. But the buffer size gained by getMinBufferSize is different on each devices and more over the amounts of samples read are also different in each while iteration. For example on my phone the buffer size is sth over 8000 but one time the samples are read in a about 2500 package, another time it's 6000 and another it's almost 8000. So I am putting my samples in a ConcurrentLinkedQueue fifo queue and if I cross 5000 I take the first chunk and do the processing. However this queue class can only accept non primitive type (so I must use Short not short). And this is a major problem, because when I looked at traceview I saw that a huge amount of time is taken by functions like 'ValueOf' (well if I have 5000 elements it's nothing surprising...). In fact this is slowing down so much that, my recording process is corrupted and the sound is broken.
Can any one advice some other fifo container I can use for working with primitive types? I was thinking about ShortBuffer but this is more like a lifo queue, and I need the samples in exact fifo order. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

