Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7726295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:10:40+00:00 2026-06-01T05:10:40+00:00

[EDIT: this question is about Mozilla Audio Data API which is no longer considered

  • 0

[EDIT: this question is about Mozilla Audio Data API which is no longer considered for HTML5 Audio API and not supported]

I am trying to change the padding of an audio file using Mozilla audio data API. I haven’t found any way to do so. I have even tried to separate channels and pass them through different filters with different dbGain with no luck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:10:41+00:00Added an answer on June 1, 2026 at 5:10 am

    The key to change the balance of your audio file, is to grab the data (for example of a stereo musicfile) and change the value (amplitude) of the right and the left channel data. Accessing the right and the left channel value would be done with [i*2] and [i*2+1], because they are in a row.

    Take an example at the one below (which I copied out of the HTML5 Games Book from Wiley):

    function generateTone(freq, balance,sampleRate) {
      var samples = Math.round(sampleRate / freq),
      data = new Float32Array(samples *2), 
      var sample, i;
    
      for (i = 0; i < samples; i++) {
        sample = Math.sin(Math.PI * 2 * i / samples);
        data[i * 2] = sample * (0.5 - balance);
        data[i * 2 + 1] = sample * (0.5 + balance);
      }
    
      return data;
    }
    

    The sinus generation you won’t need in your case.
    Further questions?
    Best regards,
    Lukas

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: This question is about finding definitive reference to MySQL syntax on SELECT modifying
EDIT: This question is more about language engineering than C++ itself. I used C++
Edit: This question was written in 2008, which was like 3 internet ages ago.
edit 2015 This question and its answers are no longer relevant. It was asked
This question is about Core Data. I created a Entity called TV with three
EDIT This question is NOT a dupe of Setting "checked" for a checkbox with
EDIT: This question was originally about checkboxes, but I am getting the same behavior
I'm trying to improve my mouse event knowledge so this question is about why
EDIT : This question duplicates How to access the current Subversion build number? (Thanks
(EDIT: This question is now outdated for my particular issue, as Google Code supports

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.