Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Making a. Raw audio file by hand.

  1. #1
    Senior Member
    Join Date
    May 2015
    Posts
    442

    Making a. Raw audio file by hand.

    Would the proper way to make an audio board compatible mono raw audio file (sine wave) be to just write a u16_t’s with the proper phase adjustment per 1/44,100 seconds? If I wanted the amplitude to read -6dm in Audicaty would the peak to peak be 2^8 or does the Audicaty add some “head room”? I want to compare what I send to a device vs what I get back level wise and adjust it's internal gain so they match.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,365
    Audacity has 0dB as full scale, no headroom.

    WAV samples are signed unless 8 bit, IIRC. For 16 bit that's +/-16384 for -6dB.

    I just use wav files and chop the header off if needed raw.

    I want to compare what I send to a device vs what I get back level wise
    Soundcards don't usually have calibrated inputs or outputs, and generally they will be different levels, so you'll need to
    calibrate with a loopback connection. The same applies to any audio codec chip like the SGTL5000.

  3. #3
    Senior Member
    Join Date
    May 2015
    Posts
    442
    Quote Originally Posted by MarkT View Post
    Audacity has 0dB as full scale, no headroom.

    WAV samples are signed unless 8 bit, IIRC. For 16 bit that's +/-16384 for -6dB.

    I just use wav files and chop the header off if needed raw.



    Soundcards don't usually have calibrated inputs or outputs, and generally they will be different levels, so you'll need to
    calibrate with a loopback connection. The same applies to any audio codec chip like the SGTL5000.
    Thanks for the help! It's not a sound card.... they are 20 year old pagers for fire departmens that need the channel announcements restored after they got scrambled.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •