SFML community forums

Help => Audio => Topic started by: Barsay on January 12, 2020, 01:35:47 am

Title: About streaming... How is Stereo managed?
Post by: Barsay on January 12, 2020, 01:35:47 am
Hi everybody  :D
I'm trying to display, and write to file, the content of an audio stream. I need to READ NUMBERS!

To do this, i'm using the getSamples() array from my buffer (wav file, 44100, Stereo ), then cycling it.
Now the question is... How are the Stereo samples disposed in the buffer? Are they R L R L, like they are in the wav file?

Thanks in advance!

-Barsay
Title: Re: About streaming... How is Stereo managed?
Post by: eXpl0it3r on January 12, 2020, 09:04:19 am
Yes, they are interleaved, but I'd have to check the source to see which channel comes first.
Title: Re: About streaming... How is Stereo managed?
Post by: Barsay on January 13, 2020, 08:39:19 pm
Thanks!

knowing that it streams as interleaved (I also checked it by plotting the buffer's 15 milion samples on R :S), I'm gonna check the R-L order on the file! ;)
Title: Re: About streaming... How is Stereo managed?
Post by: Hapax on January 16, 2020, 01:48:16 am
It's more common for left to be before right. Stereo wave files should be left then right and SFML uses left then right when playing stereo sounds.