W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2017

Re: Limiter on audio output?

From: michel buffa <micbuffa@gmail.com>
Date: Mon, 25 Sep 2017 18:15:47 +0000
Message-ID: <CAL7pXh0BAtw26KdiTjQ_N_7v-3XiYTm7jgp=-3OFyS-WA7V7oA@mail.gmail.com>
To: Raymond Toy <rtoy@google.com>, "gaito@g200kg.com" <gaito@g200kg.com>
Cc: "public-audio@w3.org" <public-audio@w3.org>
It can also be the automatic gain adjustment or the echo cancellation. You
must pass some constraint when you use getMediaDevices. Here are the
constraints I use with my guitar amp simulator:

    // MANDATORY : set echoCancellation to false, otherwise
    // Automatic Gain Control is enabled and the signal
    // level auto adjusted, affecting badly the guitar input
    // signal and adding latency
    var constraints = {
        audio: {
            mandatory: {echoCancellation: false}
        }
    };
    navigator.mediaDevices.getUserMedia(constraints)
            .then(function (stream) {
                window.stream = stream; // make stream available to console
                // Refresh button list in case labels have become available
                return navigator.mediaDevices.enumerateDevices();
            })
            .then(gotDevices)
            .then(gotStream);
    //.catch(errorCallback);
}


Le lun. 25 sept. 2017 à 20:07, Raymond Toy <rtoy@google.com> a écrit :

> See https://github.com/WebAudio/web-audio-api/issues/1272
>
> On Mon, Sep 25, 2017 at 10:36 AM, gaito@g200kg.com <gaito@g200kg.com>
> wrote:
>
>> In my test, it behaves differently depending on the browser and output
>> device (USB or built-in), clip or compressor is applied.
>>
>> Currently, I think that the absence of regulation about the maximum
>> amplitude of the signal at the destination node is the cause of variations
>> in the implementation of each browser.
>>
>> Would you like to add the following specs?
>> 1. The input of the destination node treats the amplitude of -1.0 to +1.0
>>      as the maximum amplitude (0 dBFS)
>> 2. If a signal exceeding the maximum amplitude is input,
>>      (Depending on the behavior of the lower layer) or (clip to the
>>       range from -1.0 to +1.0) or something.
>> ----------------
>> gaito@g200kg.com
>>
>> > There is no limiter specced by the Web Audio API.
>> >
>> > This is likely to be an implementation bug, please file a ticket on the
>> > affected web browser's bug tracker.
>> >
>> > Thanks,
>> > Paul.
>> >
>> > On Mon, Sep 25, 2017 at 4:27 PM, Andre Michelle <
>> > andre.michelle@audiotool.com> wrote:
>> >
>> > > Hi,
>> > >
>> > >
>> > > I cannot find anything in the docs, but it is obvious that there is a
>> > > limiter in the end of the signal chain - probably to protect the
>> listeners
>> > > from loud and ugly output if something goes wrong.
>> > >
>> > > However, is there a way to disable the limiter? I understand that for
>> most
>> > > web-audio-api applications it is a nice and convenient way to have
>> your
>> > > output limited automatically. But we are developing a DAW where the
>> user
>> > > should have full control over the signal chain.
>> > >
>> > > ~
>> > > Andre Michelle
>> > > http://www.audiotool.com
>> > >
>> > >
>>
>>
>>
>
Received on Monday, 25 September 2017 18:23:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 25 September 2017 18:23:28 UTC