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

  • SEARCH
  • Home
  • 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 8576341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:54:12+00:00 2026-06-11T19:54:12+00:00

To my knowledge, the Web Audio API in google Chrome (v21) does not support

  • 0

To my knowledge, the Web Audio API in google Chrome (v21) does not support the following:

    source.playbackRate.value = -1; 

I very much wish! I will be patient, but in the meantime, this post has a nice alternative solution. I have adopted it to try and reverse my own audio samples loaded from a loaded bufferlist, hoping that I can have both a forward and reversed version of each loaded buffer, like so:

    function finishedLoading(bufferList)  {
        for (var it = 0; it < this.urlList.length; ++it) {  
            storedBuffer[it] = bufferList[it]; // assign bufferList to globals
            storedBufferR[it] = bufferList[it];

            // attempt to reverse storedBufferR only ...
            Array.prototype.reverse.call( storedBufferR[it].getChannelData(0) );
            Array.prototype.reverse.call( storedBufferR[it].getChannelData(1) ); 
        }
    }

The above function indeed reverses playback, however it reverses both ‘storedbufferR’ and ‘storedbuffer’ such that all buffers are reversed!

So here is where I get lost… I understand that Array.protoype affects all arrays, so I suppose I can see how ‘storedBuffer’ is affected by a reverse method on ‘storedBufferR’. EDIT: the reverse method only affects the array in question

But is it possible to rewrite the above function to ensure array.protoype affects only the stored buffer I want reversed? If not, is there another way to go about storing both a forward and reversed version?

  • 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-11T19:54:13+00:00Added an answer on June 11, 2026 at 7:54 pm

    The comment about the two AudioBuffers sharing the same reference was on the right track, but the solution isn’t to create a new AudioContext; rather, you just need to create a new AudioBuffer and clone the underlying Float32Arrays that hold the actual audio samples.

    For example, this function would clone an AudioBuffer:

    function cloneAudioBuffer(audioBuffer){
        var channels = [],
            numChannels = audioBuffer.numberOfChannels;
    
        //clone the underlying Float32Arrays
        for (var i = 0; i < numChannels; i++){
            channels[i] = new Float32Array(audioBuffer.getChannelData(i));
        }
    
        //create the new AudioBuffer (assuming AudioContext variable is in scope)
        var newBuffer = context.createBuffer(
                            audioBuffer.numberOfChannels,
                            audioBuffer.length,
                            audioBuffer.sampleRate
                        );
    
        //copy the cloned arrays to the new AudioBuffer
        for (var i = 0; i < numChannels; i++){
            newBuffer.getChannelData(i).set(channels[i]);
        }
    
        return newBuffer;
    }
    

    Then, to modify the above…

    function finishedLoading(bufferList)  {
        for (var it = 0; it < this.urlList.length; ++it) {  
            storedBuffer[it] = bufferList[it]; // assign bufferList to globals
            storedBufferR[it] = cloneAudioBuffer(bufferList[it]);
    
            // attempt to reverse storedBufferR only ...
            Array.prototype.reverse.call( storedBufferR[it].getChannelData(0) );
            Array.prototype.reverse.call( storedBufferR[it].getChannelData(1) ); 
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As I have no knowledge of servlets+jsp's, is there a web-container that does not
I have a very basic knowledge of the web programming, and I couldn't figure
Disclaimer: My experience/knowledge of web services is very limited. There is an existing web
I'm beginning to design a web-based API and the very first issue—how will users
I have some ideas for web apps. Sadly, I have very little knowledge of
I am very new Android Soap Web-services I have some knowledge on consuming soap
I have some basic knowledge about web security that I have gained through years
I apologise for mixing notions but my knowledge of assymmetric web service security is
I am a web developer so my knowledge of manipulating mass data is lacking.
I am a junior web designer who has fair amount of knowledge in photoshop,

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.