Hello,
I have written a one program that uses the javax.sound.sampled.SourceDataLine object to play sound. I have tested that program on both MAC and Windows OS.
On windows OS the program works fine. On MAC OS, the program gives some strange behavior.
For example, If i have a SourceDataLine buffer of size 50000 bytes. In while loop i am calling available() method of the SourceDataLine. On windows platform, each call in loop give me some available bytes that i can write to buffer. Like 2000, 4000....etc.
But on MAC OS, i am not getting like that but instead SourceDataLine give me it when all buffer goes empty. I mean i am not getting like 2000,4000 …etc. but all buffer size like 50000 at once.
The problem is that i am not able to write data to source data line when it has some small amount of buffer free. Due to this, i am feeling some sound smoothness problem on MAC OS. Sound stops few seconds in between.
Thanks In Advance