audio

Playing sound from INACTIVE browser tab

旧时模样 提交于 2021-01-17 23:36:52
问题 I have a control panel for restaurants and it plays an alert sound when an order is given. The problem is that when the control panel tab is not the active tab in Chrome (it's also same for Firefox) the alert sound doesn't play. After clicking the tab it plays the sound. I see some sites (Facebook Chat, Cloudstats.me server alert, ...) play sound even if they are in inactive tab, so what is the workaround for this problem? 回答1: Had a similar thing happen to me as well, we were trying to play

Playing sound from INACTIVE browser tab

╄→гoц情女王★ 提交于 2021-01-17 23:36:12
问题 I have a control panel for restaurants and it plays an alert sound when an order is given. The problem is that when the control panel tab is not the active tab in Chrome (it's also same for Firefox) the alert sound doesn't play. After clicking the tab it plays the sound. I see some sites (Facebook Chat, Cloudstats.me server alert, ...) play sound even if they are in inactive tab, so what is the workaround for this problem? 回答1: Had a similar thing happen to me as well, we were trying to play

Playing sound from INACTIVE browser tab

蹲街弑〆低调 提交于 2021-01-17 23:33:01
问题 I have a control panel for restaurants and it plays an alert sound when an order is given. The problem is that when the control panel tab is not the active tab in Chrome (it's also same for Firefox) the alert sound doesn't play. After clicking the tab it plays the sound. I see some sites (Facebook Chat, Cloudstats.me server alert, ...) play sound even if they are in inactive tab, so what is the workaround for this problem? 回答1: Had a similar thing happen to me as well, we were trying to play

Playing sound from INACTIVE browser tab

对着背影说爱祢 提交于 2021-01-17 23:32:38
问题 I have a control panel for restaurants and it plays an alert sound when an order is given. The problem is that when the control panel tab is not the active tab in Chrome (it's also same for Firefox) the alert sound doesn't play. After clicking the tab it plays the sound. I see some sites (Facebook Chat, Cloudstats.me server alert, ...) play sound even if they are in inactive tab, so what is the workaround for this problem? 回答1: Had a similar thing happen to me as well, we were trying to play

Playing sound from INACTIVE browser tab

落花浮王杯 提交于 2021-01-17 23:31:23
问题 I have a control panel for restaurants and it plays an alert sound when an order is given. The problem is that when the control panel tab is not the active tab in Chrome (it's also same for Firefox) the alert sound doesn't play. After clicking the tab it plays the sound. I see some sites (Facebook Chat, Cloudstats.me server alert, ...) play sound even if they are in inactive tab, so what is the workaround for this problem? 回答1: Had a similar thing happen to me as well, we were trying to play

Web Audio API Memory Leaks on Mobile Platforms

半城伤御伤魂 提交于 2021-01-17 04:07:06
问题 I am working on an application that will be using Audio quite heavily and I am in the research stages of deciding whether to use Web Audio API on devices that can support it. I have put together a very simple test bed that loads an MP3 sprite file (~600kB in size), has a play and pause button and also a destroy button, which should in theory allow GC reclaim the memory used by the Web Audio API implementation. However, after loading and destroying ~5 times iOS crashes due to an out of memory

The byte stream type of the given URL is unsupported MediaFoundation

喜欢而已 提交于 2021-01-07 07:01:52
问题 I need to create a reader from buffer(that is wav bytes ) in order to do it I am using such approach: void co_AudioEncoderMF::load_from_memory(unsigned char const * data, long data_size) { unsigned char * buf = new unsigned char[data_size]; //JUST FOR TEST IN ORDER TO BE SURE THAT I HAVE THIS DATA memcpy(buf, data, data_size); IMFMediaType *input_type = nullptr; IMFSourceReader *source_reader = nullptr; IMFMediaType *ouput_media_type = nullptr; IMFSinkWriter *sink_writer = nullptr; IStream *

The byte stream type of the given URL is unsupported MediaFoundation

依然范特西╮ 提交于 2021-01-07 07:00:50
问题 I need to create a reader from buffer(that is wav bytes ) in order to do it I am using such approach: void co_AudioEncoderMF::load_from_memory(unsigned char const * data, long data_size) { unsigned char * buf = new unsigned char[data_size]; //JUST FOR TEST IN ORDER TO BE SURE THAT I HAVE THIS DATA memcpy(buf, data, data_size); IMFMediaType *input_type = nullptr; IMFSourceReader *source_reader = nullptr; IMFMediaType *ouput_media_type = nullptr; IMFSinkWriter *sink_writer = nullptr; IStream *

The byte stream type of the given URL is unsupported MediaFoundation

淺唱寂寞╮ 提交于 2021-01-07 06:59:38
问题 I need to create a reader from buffer(that is wav bytes ) in order to do it I am using such approach: void co_AudioEncoderMF::load_from_memory(unsigned char const * data, long data_size) { unsigned char * buf = new unsigned char[data_size]; //JUST FOR TEST IN ORDER TO BE SURE THAT I HAVE THIS DATA memcpy(buf, data, data_size); IMFMediaType *input_type = nullptr; IMFSourceReader *source_reader = nullptr; IMFMediaType *ouput_media_type = nullptr; IMFSinkWriter *sink_writer = nullptr; IStream *

How do I use the WebAudio API channel splitter for adjusting the Left or Right gain on an audio track?

不打扰是莪最后的温柔 提交于 2021-01-07 06:31:24
问题 <body> <audio id="myAudio" src="audio/Squirrel Nut Zippers - Trou Macacq.mp3"></audio> </body> <script> var myAudio = document.getElementById('myAudio') var context = new AudioContext(); var audioSource = context.createMediaElementSource(myAudio) var splitter = context.createChannelSplitter(2); audioSource.connect(splitter); var merger = context.createChannelMerger(2) //REDUCE VOLUME OF LEFT CHANNEL ONLY var gainNode = context.createGain(); gainNode.gain.setValueAtTime(0.5, context