audio

play the sound from mic using the AUGraph

余生颓废 提交于 2021-02-09 15:28:22
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

play the sound from mic using the AUGraph

寵の児 提交于 2021-02-09 15:24:41
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

QML: SoundEffect not working, Audio does

走远了吗. 提交于 2021-02-08 20:47:59
问题 I have two custom QML elements for audio, one for playing music (and extends the QML Audio element) and one for playing sound effects (which extends QML's SoundEffect element). I am able to play background music with no problem, but when I try to play a sound effect, the interface freezes for a couple of seconds (the music keeps playing) and then when it unfreezes, I get the Windows error sound. Here is what I have (the music has a similar architecture): MySoundEffect.qml Loader { id:

QML: SoundEffect not working, Audio does

限于喜欢 提交于 2021-02-08 20:47:08
问题 I have two custom QML elements for audio, one for playing music (and extends the QML Audio element) and one for playing sound effects (which extends QML's SoundEffect element). I am able to play background music with no problem, but when I try to play a sound effect, the interface freezes for a couple of seconds (the music keeps playing) and then when it unfreezes, I get the Windows error sound. Here is what I have (the music has a similar architecture): MySoundEffect.qml Loader { id:

Hijack audio with Java?

别等时光非礼了梦想. 提交于 2021-02-08 16:45:39
问题 I have been trying to modify some code found at the bottom of this page in order to hijack system audio with Java. Here's the part that I modified in captureAudio(): Mixer mixer = AudioSystem.getMixer(mixerInfo[0]); // "Java Sound Audio Engine" final TargetDataLine line = (TargetDataLine) mixer.getLine(info); Now when I run this code, it throws this: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM

Hijack audio with Java?

橙三吉。 提交于 2021-02-08 16:41:36
问题 I have been trying to modify some code found at the bottom of this page in order to hijack system audio with Java. Here's the part that I modified in captureAudio(): Mixer mixer = AudioSystem.getMixer(mixerInfo[0]); // "Java Sound Audio Engine" final TargetDataLine line = (TargetDataLine) mixer.getLine(info); Now when I run this code, it throws this: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM

Javascript audio isn't working on mobile devices

放肆的年华 提交于 2021-02-08 11:32:36
问题 The code below works fine on desktop browsers (plays music). But when I try to open the site on any mobile device it doesn't work. var music = new Audio("mscs/gamemusic.mp3"); function playmusic() { music.controls = false; music.loop = false; music.autoplay = true; document.body.appendChild(music) } I use it in a function when game starts: function createnewgame() { ... playmusic(); ... ... } Does anyone know what's wrong? 回答1: Well, this is clearly a browser support issue. According to

How to convert a mel spectrogram to log-scaled mel spectrogram

耗尽温柔 提交于 2021-02-08 10:35:25
问题 I was reading this paper on environmental noise discrimination using Convolution Neural Networks and wanted to reproduce their results. They convert WAV files into log-scaled mel spectrograms. How do you do this? I am able to convert a WAV file to a mel spectrogram y, sr = librosa.load('audio/100263-2-0-117.wav',duration=3) ps = librosa.feature.melspectrogram(y=y, sr=sr) librosa.display.specshow(ps, y_axis='mel', x_axis='time') I am also able to display it as a log scaled spectrogram: librosa

How to convert a mel spectrogram to log-scaled mel spectrogram

跟風遠走 提交于 2021-02-08 10:31:01
问题 I was reading this paper on environmental noise discrimination using Convolution Neural Networks and wanted to reproduce their results. They convert WAV files into log-scaled mel spectrograms. How do you do this? I am able to convert a WAV file to a mel spectrogram y, sr = librosa.load('audio/100263-2-0-117.wav',duration=3) ps = librosa.feature.melspectrogram(y=y, sr=sr) librosa.display.specshow(ps, y_axis='mel', x_axis='time') I am also able to display it as a log scaled spectrogram: librosa

In Android, is there any way to route the audio to A2DP using “MODE_IN_COMMUNICATION”?

走远了吗. 提交于 2021-02-08 10:28:09
问题 If I set AudioManager mode to MODE_IN_COMMUNICATION, and set the Media Player stream to STREAM_VOICE_CALL, I can route the audio to the speakerphone or the internal handset speaker just fine. And if it's routed to the internal speaker, and a wired headset is plugged int, it automatically routes to it. However, I can't figure out a way to route the audio to an A2DP headset (without changing the audio mode to MODE_NORMAL, or the stream to STREAM_MUSIC). My problem is that using MODE_NORMAL and