Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: About streaming... How is Stereo managed?  (Read 243 times)

0 Members and 1 Guest are viewing this topic.

Barsay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
About streaming... How is Stereo managed?
« 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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: About streaming... How is Stereo managed?
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

Barsay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: About streaming... How is Stereo managed?
« Reply #2 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! ;)

Hapax

  • Hero Member
  • *****
  • Posts: 3001
  • My number of posts is shown in hexadecimal.
    • View Profile
Re: About streaming... How is Stereo managed?
« Reply #3 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.
Selba Ward - SFML drawables
Kairos - Timing Library
Rectangular Boundary Collision - Rectangular SAT Collision

@Hapaxiation - Hapaxia on Twitter