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

Author Topic: What format does sfml use to record audio data?  (Read 2877 times)

0 Members and 1 Guest are viewing this topic.

M squared

  • Newbie
  • *
  • Posts: 22
    • View Profile
What format does sfml use to record audio data?
« on: February 21, 2013, 03:06:10 am »
So I'm using the recording feature in a program where I've previously been doing some work on analyzing the data stored in wave files. Looking at the data I get back from recording using sfml, the data is about 10,000 times bigger. It still looks like it oscillates above and below zero. So is it still basically standard PCM format? Also, the recorded data always starts out with a series of -1's spread throughout a series of zeros. Is this done by sfml or is this something i'm doing? I'm just trying to get a beta idea of how this data compares to how data is stored in a wave file, so any information would be helpful.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: What format does sfml use to record audio data?
« Reply #1 on: February 21, 2013, 07:48:05 am »
Afaik it just takes the RAW data it gets from the audio controller, which is probably always PCM.
But you could take a look at the source to be sure. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: What format does sfml use to record audio data?
« Reply #2 on: February 21, 2013, 07:59:55 am »
Yes, it's PCM. Samples are signed 16 bits integers.
Laurent Gomila - SFML developer

M squared

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: What format does sfml use to record audio data?
« Reply #3 on: February 22, 2013, 07:21:59 pm »
Ah, thank you much.

 

anything