audio

Can HTML5 in the browser play continuous audio on iOS lock screen?

寵の児 提交于 2021-02-18 06:23:01
问题 I have been trying to track this down and there doesn't seem to be a consistent answer. If I have a website that tries to play multiple songs in a row (think playlist) using the HTML 5 audio element, can it continue to work on the iOS lock screen? For some background, this answer seems to indicate it may be possible. But then this article suggests it is not. I tried following the closest example of what Apple recommends, as found here, to replicate this. I am using plain, vanilla javascript

(React js) Audio src is updating on setState but the audio playing doesn't change

梦想的初衷 提交于 2021-02-18 05:47:39
问题 I am trying to build a mini 2-track audio player with React. The audio is centrally controlled by a html audio element with a track-list inside a child component. The (yet to be styled) player can be seen here. I can tell in the React dev tools that clicking the individual track select buttons does update the src of the audio element (thanks to the help of a member on here), however, the playing audio doesn't change. I've posted the Application code below. Is it even possible to change the

WASAPI: Play sine wave sound in minimum latency without glitches (exclusive-event driven mode)

穿精又带淫゛_ 提交于 2021-02-18 03:26:47
问题 I'm trying to play a simple sineous waveform using the Windows Audio Session API (WASAPI) in exclusive mode, but encountering sound glitches no matter what I do. I've been using the MSDN Exclusive-Mode Streams example as a reference point, and here's how the slightly adapted code currently looks like. Setup code: -- <variable declarations, incl. "HRESULT hr; BYTE *pData;" > -- // also, hr is checked for errors every step of the way hr = CoCreateInstance( CLSID_MMDeviceEnumerator, NULL, CLSCTX

Raspberry pi with pygame.mixer audio produces only static

爷,独闯天下 提交于 2021-02-16 21:14:05
问题 I'm quite new with raspberry pi and am very new but I am trying to play an audio file through a python file on a pi B. I played the audio from the command line using omxplayer and it worked fine but when i run the following code it plays only static. from pygame import mixer mixer.init() wow = mixer.Sound('Wow.mp3') wow.play() time.sleep(5) I tried using mixer.load('Wow.mp3') and other variations but still only get static. I tried putting things in the init like mixer.init(4800, -16, 1, 1024)

How to convert base64 string into an audio mp3 file?

帅比萌擦擦* 提交于 2021-02-14 18:43:38
问题 I'm getting a base64 string from android side. I have to convert it into an audio file and have to save it into a folder. I thought I have to convert it first into byte array. Then after it, I have to convert it into a mp3 file. But don't know how. I have done work in base64 to image. If anyone know answer then please explain with an example. Thank You. 回答1: If the base64 encoded data already represents an MP3 file, it should be as easy as decoding the base64 data and storing it in a file:

How to convert base64 string into an audio mp3 file?

安稳与你 提交于 2021-02-14 18:36:12
问题 I'm getting a base64 string from android side. I have to convert it into an audio file and have to save it into a folder. I thought I have to convert it first into byte array. Then after it, I have to convert it into a mp3 file. But don't know how. I have done work in base64 to image. If anyone know answer then please explain with an example. Thank You. 回答1: If the base64 encoded data already represents an MP3 file, it should be as easy as decoding the base64 data and storing it in a file:

Sound makes app lags on Android - any solution?

帅比萌擦擦* 提交于 2021-02-11 18:12:28
问题 So my game runs smoothly on PC (win 10), but lags on android phone (Mi 9T pro, SD 855, 6GB of ram). I don't mean that only sound lags, but graphics also. When I disable sounds it runs perfectly smooth (as it should). Yes I know that this question is asked and answered many times. And I tried all offered "solutions", but nothing helps. Tried using 22KHz samples, 44.1Khz, 48Khz. Tried adding 1 second of silence at end of each sample. Didn't help. I'm loading samples with this method: private

Sound makes app lags on Android - any solution?

∥☆過路亽.° 提交于 2021-02-11 18:09:11
问题 So my game runs smoothly on PC (win 10), but lags on android phone (Mi 9T pro, SD 855, 6GB of ram). I don't mean that only sound lags, but graphics also. When I disable sounds it runs perfectly smooth (as it should). Yes I know that this question is asked and answered many times. And I tried all offered "solutions", but nothing helps. Tried using 22KHz samples, 44.1Khz, 48Khz. Tried adding 1 second of silence at end of each sample. Didn't help. I'm loading samples with this method: private

Translate audio from speaker output in python with azureSDK

妖精的绣舞 提交于 2021-02-11 16:51:02
问题 I'm looking to make an application, who woul'd let me translate any audio going out of the speaker in live stream. This way, i will be able to translate any videoconference from any live stream app(youtube,teams,zoom,etc.). I'm not far from a solution, but not there yet. Src language would be: fr-CA or en-US Dst language would be : fr-Ca or en-US I was able to get audio stream back from speaker with a custom version of pyaudio allowing loopback with the WASAPI of windows.(https://github.com

Gstreamer duplicate 2channel audio

若如初见. 提交于 2021-02-11 14:49:50
问题 I would like to generate 2 audio tones using audiotestsrc but then duplicate those two channels across 16 channels (i.e 8channels of the one tone and 8channels of the other). I have a command that generates 2 tones for 2 channels: gst-launch-1.0 interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! "audio/x-raw,channels=1,channel-mask=(bitmask)0x1" ! queue ! i.sink_0 audiotestsrc wave=1 freq=150 volume=0.4 !