FAQ Database Discussion Community


play audio periodically from a memory stream c#

c#,audio,windows-phone-8.1,memorystream
I have some buffer containing samples of sinus which I want to be played from a memory stream periodically. Is there any efficient way to play it without having gaps in time? I try to make my own signal generator (I know that are some libraries providing that but I...

Cloning audio source without having to download it again

javascript,html5,audio
I'm creating a piano in the browser using javascript. In order for me to play the same key multiple times simultaneously, instead of just playing the Audio object, I clone it and play the clone, otherwise I'd have to wait for the audio to finish or to restart it, which...

My sounds are not playing in Chrome

javascript,html5,google-chrome,audio
I have a small, very basic 3d game that runs in all browsers. But my issue is that when it runs in Chrome I can see in my console messages that the sounds are "pending" and don't play when they should. The thing is that after some time have passed...

Implementing VOIP over udp, what is the approach to take when the player cannot cope up with received packet's speed

android,audio,udp,voip,rtp
I am implementing p2p voice over IP on android, using UDP, openSL and some audio compression. The voice chat works good when 2 peers are connected, and the lag is steadily about 100ms. When a third peer connects, one or more peer progressively accumulate lag, reaching 15+ seconds in some...

How to play song URL on MPMusicplayerController?

ios,iphone,swift,audio,mpmusicplayercontroller
So I want to play song using it's url using MPMusicPlayer. I already able to populate music info from MPMediaCollection to UITableView. What I want to do is when I tap tableview row it play song that have the same title in the tableview row. Here is my code how...

Additional information for songs recognised by dejavu.py

python,audio,audio-fingerprinting
I'm currently investigating dejavu.py (some more info), and I must say that I am quite impressed by it so far. Though I do find that the docs are a bit incomplete when it comes to user interfacing. When you recognise a song from file with oDjv.recognize(FileRecognizer, sFile), you get returned...

Stereo to Mono wav in Python

python,audio,signal-processing
I am loading a wav with the scipy method wavefile.read() which gives me the samplerate and the audiodata I know that this audio data if stereo is stored as a multi-dimensional array such as audiodata[[left right] [left right] ... [left right]] I am then using this method to create a...

How to convert base64 string into an audio mp3 file?

php,audio,base64,mp3
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...

iOS Safari play sounds in sequence after one touch

javascript,ios,audio,safari,playlist
I'm doing some R&D with playing audio on safari for iOS. I know that there are limitations for playing audio programmatically in the sense that it has to be done from a user initiated event. What I am wondering though is if we can initiate a playlist. I want to...

Trim audio file and get the part between silence

linux,audio,terminal,speech,sox
My goal is to get the parts of audio file that contains non-noise sounds by using SoX. I have read the effects of SoX and found noisered and silence which I consider helpful. The problem is that I have not found command that can trim the audio file based on...

RawSourceWaveStream volume control and playback time estimation with Naudio

audio,volume,naudio
I'm using Naudio to play audio samples from memory. private RawSourceWaveStream waveStream; private MemoryStream ms; private int sampleRate = 48000; private IWavePlayer wavePlayer; //generate sine wave signal short[] buffer = new short[(int)Math.Round(sampleRate * 10.00)]; double amplitude = 0.25 * short.MaxValue; double frequency = 1000; for (int n = 0; n...

Alert once an activity is detected

matlab,audio,alert
My program is to record automatically once a sound is detected, I want to put an audible alert once the program starts recording.

Corona sdk : stop audio when another starts / launch audio just once

audio,corona
I want to stop a sound when another starts playing . if (event.object1.myName == "obst3") then audio.play(colsound) I want this one to stop if the following one starts . if (event.object1.myName == "t") then audio.play(explosion) Also, I need to know how to launch the sound just once ( when my...

AVPlayer (or AVAudioSession?) plays after I leave the ViewController, and when I return two are then playing

ios,objective-c,audio,avplayer,avaudiosession
I have a viewController that streams audio from the web. When I leave that page of my app, the audio keeps playing (this is good). However, when I go back, the viewdidload method creates a second audioplayer. I can do this over and over until I have so many AVplayers....

How do i play a sound in python 3?

python,audio,pygame
I wanted to write a python script to play a sound (recorded using windows recorder)! I read pygame can do the job and installed pygame! But I don't know how to write a code that plays a sound from a specific path! I have to play an audio file located...

mediaelement.js - How to change width

javascript,audio,media-player,mediaelement.js,mediaelement
I have tried to find which of the plethora of tags controls the width of the mediaelement.js audio player but can't seem to work it out. I'm assuming it's a combination of the tags that need to be edited? I downloaded the player from the mediaelemenjs.com and the CSS for...

How to join two wav files together not one after the other

audio
How to join two wav files together not one after the other? I know how to combine the files one by one, but I do not know how to unite them so that overlap.

Shoutcast + Web Audio API CORS issue

javascript,ajax,audio,shoutcast
I have a problem I've been working on for a while now with no real headway. I am currently trying to load my Shoutcast stream into my Web Audio API Context. I figured it would violate the CORS and I was right. I tried both through an XHR Request and...

How to completely load audio but play it later?

java,audio,javasound
So, I have an AudioInputStream, which reads from a FileInputStream. I want to close the FileInputStream which will close the AudioInputStream. Is there any way to load the audio completely, so that I don't have to stream it directly from the file?...

Audio not working in Javascript

javascript,html,audio
I'm trying to get audio to play in general, but it does not seem to be working. I thought perhaps the interval or if statements were stopping it from playing, but as you can see even a call before all that does not make any sound. The directory is in...

Convert mp3 to WAVE in java without external libraries

java,audio,javasound
Is there a way to convert a mp3 audio file into a wav audio file in java without using external libraries?

Core Audio: Audio Unit to boost signal level

ios,audio,boost,core-audio,avaudiosession
Our VOIP app uses both the Voice Processing IO Unit and the Remote IO Unit (we rebuild the AUGraph depending on which IO unit we require). We've noted that the audio output level is not as loud as some other VOIP apps such as Skype. Rather than manipulating the incoming...

After Effects scripting - convert audio to keyframes?

javascript,audio,after-effects
How can you do "convert audio to keyframes" using scripting in after effects, manually you would right-click on the "sound" layer > keyframe assistant > convert audio to keyframes. var myComp = app.project.activeItem; var musicComp = myComp.layer("music"); var myEffect = musicComp.property("Effects").addProperty("High-Low Pass"); myEffect.property("Filter Options").setValue(1); myEffect.property("Cutoff Frequency").setValue(50); // then I want...

Windows - sound recording program giving noise

windows,audio,wav
I wrote the following program to record the sound through soundcard in windows and print the PCM data from buffer of waveheader. But it gives only the data 32600-32700. Is the problem with my soundcard? I have used WAVE_MAPPER which automatically selects the source...Please help me #include <Windows.h> #include <MMSystem.h>...

C# NAudio makes Noise WAV file without errors after POST from another page

c#,audio,wav,naudio
I am posting a file in callback(base64data); to the server using. When I get the file all seems well but the file sounds like white noise. Thanks for your help. protected void Page_Load(object sender, EventArgs e) { var strUser = Request.Form["UserId"]; int userId = Convert.ToInt32(strUser); var reader = new RawSourceWaveStream(HttpContext.Current.Request.InputStream,...

fftw of 16bit Audio :: peak appearing wrong at 2f

c++,audio,fft,fftw,portaudio
I am taking 32bit float audio(44.1Khz) on my PC(between -1 and +1) using Port Audio and taking fft of it with fftw. Now I need to take the 16bit int Audio and take its fft. I have converted the Audio samples to float between -1 and +1. The fft works...

HTML Audio embed not working on Internet Explorer

html5,audio
On my website I have put in audio. It works fine in Chrome, with autoplay and loop, but with IE it says "An unknown error occurred". The audio file is "ComicSans.mp3", and here is the coding: <body bgcolor="#5e54e8"> <a class="GeneratedLink" href="http://georgeocodes.github.io/" target="_blank"">George O Codes</a> <audio controls> <audio src="ComicSans.mp3" controls autoplay...

Working with MIDI in Windows Store App (Win 8.1)

c#,audio,windows-store-apps,midi
My goal is to receive MIDI messages in Windows Store Apps. Microsoft has delivered an API called Microsoft.WindowsPreview.MidiRT (as a nuget package). I managed to get a midi port, but MessageReceived event is not arised, although I'm pressing keys on my MIDI keyboard, and other MIDI programs show me that...

Sound go back with Swift

swift,audio
I can play a sound when I click a button. I could find this and it works well with play: var sound1 = AVAudioPlayer() func setupAudioPlayerWithFile(file:NSString, type:NSString) -> AVAudioPlayer { var path = NSBundle.mainBundle().pathForResource(file as String, ofType: type as String) var url = NSURL.fileURLWithPath(path!) var error: NSError? var audioPlayer:AVAudioPlayer? audioPlayer...

Unity 5 Audio Volume Slider (Solved)

c#,audio,unity3d
I am trying to create an slider that I can use for volume control in Unity 5 but the volume will not change. My Game Objects are called MainMusicPlayer for the audio source and Volume Slider for the slider I am going to post the whole script as it would...

Use toggle button to control sound

android,audio,togglebutton
I need my app to play all the sounds when toggle button is checked and stop playing them when it is unchecked.By all sounds I mean the sound played when other buttons present in the activity and other activities are pressed. Following is my toggle button: <ToggleButton android:layout_width="70dp" android:layout_height="70dp" android:id="@+id/toggleButton"...

Instantiating a SoundFile object within a class in Processing

audio,processing
I am attempting to create an instance of the SoundFile type inside of another class in Processing (the latest version, 3.0a10). I can easily play a sound that is defined outside of a class, as follows: import processing.sound.*; SoundFile clickSound; void setup() { size(600, 600); clickSound = new SoundFile(this, "bike-passing-by.wav");...

Corona sdk : Play sound when main object hits an obstacle

audio,corona,playsound
I want to play a specific sound when a ball hits a specific object (transparent obstacle) or passes through a specific area. function onCollision(event) if event.phase == "began" then storyboard.gotoScene("restart", "fade", 400) end` end `ball = display.newImage("ball.png") --main object code ball.x = 100; ball.y = 100 physics.addBody(ball, "dynamic", {density=.05, bounce=0.1,...

Playing a .wav file in c# using SoundPlayer

c#,audio,soundplayer
I am currently having a probelm, where a file was sent to me as .m4a and I renamed it to .wav..... (I think that is the issue as I can play other .wav files) Now it is giving me this error when I run the code: Additional information: The file...

Tried multiple solutions onsite, none worked: Play

javascript,jquery,html5,audio,interactive
This is my first question on Stack Overflow! :D There appear to be multiple similar questions, but I have tried each solution and none of them are working, and yet I'm determined to get to the bottom of this. The goal is to play audio upon successful konami code entry....

Firefox OS - save file in the app directory

javascript,audio,io,firefox-os,howler.js
I am currently developing an audio editing application for firefox OS (github). That uses, for playback, Howler JS (link). On Firefox OS, I can easily play audio files which are within the application folder (does not matter where) only by passing an URL to Howler, but, if I want to...

How to retrieve data from NSUserDefaults?

ios,swift,audio,nsuserdefaults,mpmediaitemcollection
currently, I try make an music playlist application. I try to save and retrieve playlist data from NSUserDefaults. I have no problem when saving the data but I got an error when retrieving data. I got: Terminating app due to uncaught exception 'MPMediaItemCollectionInitException', reason: '-init is not supported, use -initWithItems:...

VoIP limiting the number of frames in rendercallback

ios,objective-c,audio,core-audio,audiounit
I am currently developing a VoIP application and one of the libraries I am using requires me to send the frames in the input call back. The requirements is that I must send a sample count which is defined as the number of samples in a frame. This callback will...

Javascript alert box blocks sound object

javascript,audio,alert
I have a small problem. Basically, I am trying to make an application that it will pop up a box while playing a certain sound. Here is the fault part of the code: var audio = new Audio('song.mp3'); audio.play(); alert(1); The problem is that the audio plays after the alert...

Linux ALSA Driver using channel count 3

linux,ubuntu,audio,alsa
Am running my ALSA Driver on Ubuntu 14.04, 64bit, 3.16.0-30-generic Kernel. Hardware is proprietary hardware, hence cant give much details. Following is the existing driver implementation: Driver is provided sample format, sample rate, channel_count as input via module parameter. (Due to requirements need to provide inputs via module parameters) Initial...

Audio on scroll

javascript,jquery,css,audio,skrollr
I'm doing a website with the skrollr plugin and I'm almost done with the pictures and scrolling itself, so I'm trying to add the audio now, but I can't seem to make the audio start and stop when I want it to. This is the script I am currently working...

How do I look through a javascript array of audio files?

javascript,arrays,audio,for-loop,playlist
I have a small question about using an array containing Audio-sources (links) in a for loop. This is my code, basically: var audio = new Audio(); var playlist = new Array('sounds/song0.m4a', 'sounds/song1.m4a', 'sounds/song2.m4a'); for (var i = 0; i <= playlist.length; i++){ audio.src = (playlist[i]); audio.volume = 0.3; audio.loop =...

VHDL audio sample volume control

audio,vhdl
I was searching a lot about this problem, but I cant find anything usefull... The problem is, Im making echo efect on FPGA chip.. I have everything prepared, like BRAM for delay, input, output with delay, but I can't find out, how to change volume of output which is coming...

How do I implement audio controls on this audio visualizer that uses HTML5 Web Audio API?

javascript,php,html5,audio,web-audio
I know how put audio controls when you're importing the source of the audio like so: <audio src="audio.mp3" id="audio" controls="true"></audio> What's different about the audio visualizer that im trying to fiddle with is that it uses the audio, that the user has to upload (test the demo below). What I...

Cant get value from struct wrapped in NSValue

ios,objective-c,audio,struct,singleton
I need to pass a struct AudioStreamBasicDescription to a random view controller. In order to that I have created a singleton class and I want to store AudioStreamBasicDescription in that singleton class. When the other view controller needs to use the AudioStreamBasicDescription I want to get the values inside of...

video to audio file convert & save through FFMPEG in node js

javascript,node.js,audio,video,ffmpeg
I am working on an FFMPEG on node js. I'd like to retrieve the audio track from a video file using node js. I would also like to save such file but I can't figure out how. I though this line of code would help me : ffmpeg('/path/to/file.avi').noVideo(); I have...

Raw numpy array from real-time network audio stream in Python

python,audio,numpy,ffmpeg,pyaudio
I would like to get raw data (optimally as a numpy array) from a PCM network audio stream for which I have an URL. The goal is to analyze the signal from the network stream in real-time. There seem to be a lot of Python audio modules or wrappers around...

Using rangeslider.js for an HTML5 audio time scrubber

javascript,jquery,html5,audio,slider
I am digging into the finer points of Andre Ruffert's rangeslider.js and I am having difficulty into incorporating his code into controlling and reacting to a simple HTML5 audio element. I see that you can programmatically change the value of the slider with the click of a button, but how...

Cordova media plugin and local files in Windows Phone 8

cordova,audio,windows-phone-8,media
I want to port cordova app to Windows Phone 8 platform. But there's come troubles with sound. There was string new Media('/android_asset/sounds/bell.wav'). When I changing param to 'sounds/bell.wav', error code is 1. If I put 'x-wmapp0:www/sounds/bell.wav' or 'file:///www/sounds/bell.wav' there's no errors but sounds is not playing. URLs from Internet (files...

How can I get my iPhone to listen for sound frequencies above a certain threshold?

ios,objective-c,iphone,audio
I'm interested in getting my iOS app to turn on the microphone and only listen for frequencies above 17000 hz. If it hears something in that range, I'd like the app to call a method. I was able to find a repository that detects frequency: https://github.com/krafter/DetectingAudioFrequency And here is a...

“Converting” in jQuery an audio player with multiple tracks

javascript,jquery,audio
I have a tracklist and I'd like to serve a preview of 3 songs with just a play and pause button. Here's the messy snippet I have right now in JS: var playing = false; playpause01.addEventListener('click', function () { if (!playing) { document.getElementById('player01').play(); this.src = 'files/img/pause.png'; } else { document.getElementById('player01').pause();...

How to reproduce audio from a stream source

c#,windows,audio,windows-phone
Thank you for your answer, I really appreciate it, and I have to share with you that it was a useful example, but in the following link is explained how to use it on Windows Phone 8.1 and how to create your own implementation of MSS. http://video.ch9.ms/sessions/build/2014/2-528.pptx...

Unity3D Play sound from particle

audio,unity3d,collision,particles
I am trying to play a sound when a particle collides with a wall. Right now, it just plays the sound from the parent object, which is the player. However, I want the sound to play from the particle. Which means when a particle is far to the left, you...

How to repeat captcha letters

javascript,audio,captcha,repeat
So, i have this captcha php code, that randomly generates a string and creates an image with it... Now i am trying to do a system that will repeat the letters. I have used a speech synthetizer to create sounds for letters and numbers from 0-9 and a-z. But my...

Concatenate two audio files in Swift and play them

swift,audio,concatenation,avaudioplayer,wav
I try to concatenate .wav audio files in swift. Here is my code : func merge(audio1: NSURL, audio2: NSURL) { var error:NSError? var ok1 = false var ok2 = false var documentsDirectory:String = paths[0] as! String //Create AVMutableComposition Object.This object will hold our multiple AVMutableCompositionTrack. var composition = AVMutableComposition() var...

With NAudio howto capture an signal played

.net,audio,naudio
Is there any way to capture a sound signal being played (by another application) in .NET (with or without the NAudio library)? What I want to do is build an graphical visualization of the sounds played (like there are plenty apps), but without playing the sound itself (which seems non...

How to encode and decode audio using opus

ios,audio,codec,opus
I am trying integrate opus into my application, the encode and decode function returns positive value which means successfully, but the output audio can't play. Raw audio data can play as well. Here is how I encode data. I use 4 bytes prefix to separate from each packet. self.encoder =...

ios - How to play MPMediaItemCollection?

ios,iphone,swift,audio,mpmusicplayercontroller
So, I already stored few mpmediaitemcollection in NSUserDefaults. I already retrieve it on UICollectionView. here is my code: func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { self.performSegueWithIdentifier("toList", sender: self) User.mdci = decodedPlaylistData[indexPath.row] as? MPMediaItemCollection getSongListInfo((decodedPlaylistData[indexPath.row] as? MPMediaItemCollection)!) MPMusicPlayerController().setQueueWithItemCollection((decodedPlaylistData[indexPath.row] as?...

Javascript play multiple audio in loop

javascript,audio,while-loop
I create html and javascript for play sound number : <audio id="audio_0" src="0.wav" ></audio> <audio id="audio_1" src="1.wav" ></audio> <audio id="audio_2" src="2.wav" ></audio> <audio id="audio_3" src="3.wav" ></audio> <audio id="audio_4" src="4.wav" ></audio> <audio id="audio_5" src="5.wav" ></audio> <audio id="audio_6" src="6.wav" ></audio> <audio id="audio_7" src="7.wav" ></audio> <audio id="audio_8" src="8.wav" ></audio>...

How do you change source in a web audio context

html5,api,google-chrome,audio,web-audio
I'm making a game that changes some of it's object depending on what music is playing. After each song has ended I want my audio context to load in a new source and analyze that. However whenever I tried to do that I've gotten the error that an audio object...

Background Music in Adobe Flash keeps duplicating?

actionscript-3,flash,audio
I have a problem with my background music. So I added this code on frame 1: var bmsound:Sound = new backgroundmusic(); var channel:SoundChannel; channel=bmsound.play(0,10000); And it works like a charm. The problem is, when I navigate to other frames and go back to frame 1 again, the music plays again,...

Callback for connected/unconnected device using portaudio?

c++,audio,portaudio
Is there a callback to know when the device list is updated? If not, is there a way of detecting it ( ideally cross platform )? At the moment the only way i found is to re-initialise PortAudio. ps: I tried to find "callbacks" documentation on PortAudio documentation but i...

Adding music to my sound board project

java,audio
So I'm creating a soundboard for my CS project using java. The soundboard consists of an 8 piece drum set that is supposed to play its set sound when clicked. I've set the area to be clicked but don't know how to implement sound that'll start when the set area...

How to Play Audio in Background Swift?

ios,swift,audio,avfoundation
as you see I'm streaming something. But when I press the home button and exit the app streaming stops or I cannot hear. How can I continue streaming in background and listen it from lock screen? ViewController.Swift import UIKit import AVFoundation import MediaPlayer import GoogleMobileAds class ViewController: UIViewController, GADInterstitialDelegate {...

Stream.CopyTo(newStream) return Length 0

audio,windows-phone-8.1,memorystream
I try to make some concatenation of buffers which are saved in a memory streams. Then, when I'm trying to play the whole buffer it gives an exception: An exception of type 'System.ArgumentException' occurred in Microsoft.Xna.Framework.ni.dll but was not handled in user code Additional information: Ensure that the buffer length...

Play Audio from other apps

ios,audio,mpmusicplayercontroller
So when I launch my app, I want to be able to tell when music from another app is playing (system, soundcloud, pandora, spotify, etc). I am able to do so with this: BOOL isOtherAudioPlaying = [[AVAudioSession sharedInstance] isOtherAudioPlaying]; if (isOtherAudioPlaying){ NSLog(@"Playing Music"); }else{ NSLog(@"Not Playing Music"); } And I...

Audio Jump Forward Button

swift,audio
I've got the following code tied to a 'Jump Forward' button: @IBAction func jumpForwardPressed(sender: AnyObject) { var currentTime = audioPlayer.currentTime var playForwardSkip = NSTimeInterval() audioPlayer.stop() audioPlayer.prepareToPlay() playForwardSkip = 3.0 // skip forward 3 seconds var skipF = currentTime + playForwardSkip println("currentTime:\(currentTime) and playForwardSkip:\(playForwardSkip) and skipF:\(skipF)") audioPlayer.playAtTime(skipF) When button is pressed,...

Audio player - sharing data between callbacks

matlab,audio,callback
I already asked this question to no avail. I couldn't solve the problem. I am trying again maybe someone can help! I have 2 buttons, Play and Stop. I would have the path of an audio track at hand and want the audio to play when the user clicks on...

Playing audio for given amount of time in Android

java,android,audio,media-player
I am new to Android development. In this application, I wanted an audio to play for certain duration (say 20 seconds). After 20sec it should not start to play. I used getDuration() method, but i didn't get what i need to. Code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setVolumeControlStream(AudioManager.STREAM_MUSIC);...

onended audio event firing without playing the audio

javascript,html5,audio,javascript-events
I have multiple audio files that i need to be played. and only when all audio has been played completely the next section is supposed to show. the code that i've written fires automatically without playing any audio. how should i do it? here's my code <!DOCTYPE html> <html> <body>...

FFmpeg audio crossfade

linux,audio,ffmpeg,cross-fade
I'm trying to merge several videos using ffmpeg and apply the cross-fade transition in between. I got video cross-fade working by referring to this. At the same time I need to have audio also to have cross-fade applied for original audios associated with each video. I referred several places but...

Web Audio- streaming file from server to client

javascript,audio,types,web-audio
I'm trying to stream audio from a server containing an audio file to a client using BinaryJS. My code was inspired by the code in this question: Playing PCM stream from Web Audio API on Node.js Here's what my server code looks like: // create a BinaryServer using BinaryJS var...

How do I Mute The Audio In Unity 3D?

c#,audio,unity3d,mute
with script this. what is wrong in script this ? audio.mute = ToggleButton.isSpeakerOff; sorry bad english,fast answer please correct my script please...

How do I progammatically play the Android NFC notification sound?

android,audio,nfc
I have an app (NFC Sniffer) which allows users to read NFC tags. When a user attempts to read a tag, 1 of 3 things happens: Nothing, the tag was not brought close enough Detected NFC, but fails to read card, in which case a notification tone is played. Reads...

AVAudioPlayer wont play sound when called in other swift file

ios,swift,audio,avaudioplayer
I have two swift files - my ViewController:UIViewController and AudioPlayer:AVAudioPlayer. My AudioPlayer file has this function func seaGullSound() { var tmp = AVAudioPlayer() var seaGullSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Gulls", ofType: "mp3")!) AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil) AVAudioSession.sharedInstance().setActive(true, error: nil) var error:NSError? tmp = AVAudioPlayer(contentsOfURL: seaGullSound, error: &error) tmp.prepareToPlay()...

What is the structure of this JavaScript expression and why does it evaluate to 'true'? (HTML5 audio tag and canPlayType() function)

javascript,html5,audio
I am working through a JavaScript/HTML5 book and have encountered an expression that I don't understand. The code uses JavaScript's .canPlayType() function to check whether a browser supports a given HTML5 audio format (in this case it's checking for mp3 support). The particular expression I'm confused with is on the...

How do I calculate logrithmic labels for a VU meter scale?

javascript,html5,audio,canvas,html5-canvas
I writing a meter widget using canvas and need to calculate the label values for the scale. No problem except when I'm trying to re-create the scale for a VU meter. I understand it's logrithmic, but the values aren't powers of 10 on that type of meter. The function I...

Invalid 'n' argument error in readBin() when trying to load a large (4GB+ audio file)

r,audio,runtime-error,analysis,tuner
I'm trying to load a sample from a 4GB+ mono WAV file (total file duration 24h, I'm loading a 15min slice). library(tuneR) so <- readWave( "file.wav", from = 1, to = 15, units = "minutes" ) This is the traceback Error in readBin(con, int, n = N, size = bytes,...

Unity3d AudioSource not creatable

c#,audio,unity3d
I have a strange problem in unity3d. I want to use several audio sources for playing a sound with a overlapping effect. Because I can't explain the problem myself- I tried the same with only one AudioSource. So I have this script: public class audioOverlap:MonoBehaviour { private AudioSource sct; public...

Automatic slider in Pure Data?

audio,puredata
I am trying to simulate an ocean sound automatically on Pure Data. So far I have accomplished to achieve a very basic sound by filtering some noise with a [bp~]. I have seen that the best range of the cut-off frequency is from 300 to 500 Hz, therefore I would...

BufferedWaveProvider doesnt work in Unity

c#,audio,unity3d,naudio
I am trying to implement NAudio into Unity. I managed to link the NAudio dll, but I am getting a strange error when I try to play music with NAudio BufferedWaveProvider. If I to this: WaveOut player; BufferedWaveProvider buf; AudioFileReader reader; void Start () { reader = new AudioFileReader(@"..\music.mp3"); //...

iOS Swift: Sound not playing on iPhone Simulator

ios,iphone,swift,audio,ios-simulator
In my iOS Swift application, and i am trying to play sound on click of a button. func playSound() { var audioPlayer = AVAudioPlayer() let soundURL = NSBundle.mainBundle().URLForResource("doorbell", withExtension: "mp3") audioPlayer = AVAudioPlayer(contentsOfURL: soundURL, error: nil) audioPlayer.play() } I am running the application in iOS iPhone Simulator. I have doorbell.mp3...

ios media picker shows only white screen/stuck

ios,iphone,swift,audio,mpmediapickercontroller
So I'm currently making an music application for my project, and it allows user to create their own music playlist. However when I clicked on show media picker button it only shows white screen, It doesn't happen when the view that contains media picker is Initial View Controller. But when...

Searching an arrayList generated by an audio recognition

java,android,audio,arraylist
I am working on app that take the audio of the user and save them in an arrayList, then searching this array list to see if the desired word generated by the google audio API exists, so we can do actions. The action that I wanted is removed and replace...

AVAudioPlayer not playing long sounds?

ios,audio,avaudioplayer
I have a series of sound files ranging from 0.3s to 3.0s. When trying to play with AVAudioPlayer, I get nothing, unless I add a sleep(4) call after to ensure the sound can play. Really weird. Apart from that, no errors with the error param that gets passed in, and...

Toggle VideoView's audio with a Button

java,android,audio
I am using a videoView to play a video. bVideoView = (VideoView) findViewById(R.id.bVideoView); bVideoView.setVideoPath(videoPath); Now I have a button, audioToggle = (Button) findViewById(R.id.audioToggle); Then I have the Button's OnClickListener private static int aux = 0; private AudioManager mAudioManager; audioToggle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { bVideoView.start(); mAudioManager =...

Audio will not play on Android using phonegap, but works fine on iOS

android,html5,cordova,audio,phonegap-plugins
It works fine on iOS. I have looked many answers including these 2: Play sound on Phonegap app for Android HTML5 audio not playing in PhoneGap App (Possible to use Media?) I have tried all of the solutions: Changing the path to /android_asset/www/ for Android Using .ogg files Pre load...

Audio through built-in speakers when earphones are plugged in headphone jack in Android

android,audio,soundpool,android-audiomanager,headphones
In my application, there is one Card Reader which uses Audio Jack of devices.Now, my problem is I want to produce sound from built-in speakers when Card Reader is intact in HeadPhone Jack of the device. Here are the codes I have tried: 1) Using Reflection Methods Class audioSystemClass; try...

Determine amplitude of low frequency signals using FFT

c#,audio,signal-processing,fft
I am totally new to signal processing and am trying to make a program that shows the amplitude of low frequency signals in a PCM (WAV) file. So far, I've been able to read in the WAV file and populate an array (actually a multi-dimensional array, one for each channel,...

When reading a WAV file, dataID is printed as “fact” and not “data”

audio,wav
I'm new to audio playback and have spent the day reading over the wav file specification. I wrote a simple program to extract the header of a file but right now my program always returns false as the DataID keeps returning as "fact" instead of "data". There are a few...

What's the reason of using Circular Buffer in iOS Audio Calling APP?

ios,objective-c,audio,core-audio,audiounit
My question is pretty much self explanatory. Sorry if it seems too dumb. I am writing a iOS VoIP dialer and have checked some open-source code(iOS audio calling app). And almost all of those use Circular Buffer for storing recorded and received PCM audio data. SO i am wondering why...

Processor Audio JavaScript HTML5

javascript,jquery,events,audio
There is a js-script: <script> function start1() { var audio = new Audio(); audio.src = URL.createObjectURL(document.getElementById('f1').files[0]); audio.autoplay = true; } function start2() { var audio = new Audio(); audio.src = URL.createObjectURL(document.getElementById('f2').files[0]); audio.autoplay = true; } ... function stop() { var audio = new Audio(); audio.stop(); } </script> and html code:...

Android How To Find Decibels

android,audio,microphone,decibel
I'm trying to get the decibels from the microphone and have looked everywhere how to correctly do it but they don't seem to work. I get the amplitude like this public class SoundMeter { static final private double EMA_FILTER = 0.6; private MediaRecorder mRecorder = null; private double mEMA =...

Merge 2 video files with thier audio in a single file side by side

audio,video,ffmpeg,mux
I need to merge 2 video files along with their audio in single file side by side. I am able to merge 2 video files in single file but it using audio of first video file only, where as I need to merge audio of second file as well. below...

How to force all sounds to shut down

java,android,audio
I'm making an application that makes a sound when a particulate thing happens, I made an other Layout that contains a button to stop that sound but the problem is that whenever I say MediaPlayer.stop();the application on the emulator or even on my mobile says the application has stopped The...

How do I swap stereo channels in raw PCM audio data on OS X?

audio,aiff
I'm writing audio from an external decoding library on OS X to an AIFF file, and I am able to swap the endianness of the data with OSSwapInt32(). The resulting AIFF file (16-bit PCM stereo) does play, but the left and right channels are swapped. Would there be any way...

How to control red noise generator by another one (Rocket engine effect - Subtractive synthesis of sound)

java,audio,signals,signal-processing,wav
I programming some sound effects in Java and exporting them into .wav files. Currently, I am trying to program a rocket engine sound effect. I want to do it in the following way: The sound of a rocket engine may be synthesized with a red noise generator controlled by a...

Get 403 (Forbidden) for audio tag

javascript,ajax,audio,html5-audio
I am using following JavaScript code for play audio after complete ajax: $(document).ready(function () { $.ajaxSetup( { cache: false, complete: function () { $('#loading').hide(); $('#page_content').show(); //get gold price and compire timestamp var published_date = $("#goldprice").data("published"); var currend_date = Math.floor(Date.now() / 1000); var compare_date = currend_date-published_date; if( compare_date <= 10){ document.getElementById('ding').play();...

Custom audio player issues

javascript,css,html5,audio
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style type="text/CSS"> #custom{ font-family: monospace; font-size: 16px; max-width: 650px; border-style: solid; border-color: black; border-width: 1px; border-radius: 5px; padding: 8px; padding-bottom: 15px; padding-left: 12px; padding-right: 12px; } img{ margin-top: 3px; float: left; } #bar, #currentTime, #duration, #skip{ display: inline-block; } #currentTime, #duration, #skip{ margin: 0px;...

Python Ripping CD Files to WAV

python,audio,wav,cd-rom
I'm writing a program where I need to be able to rip files from a CD into WAV format (or flac but wav works fine). It must run on Windows. I saw other answers where Express Rip and Audio Commander were recommended as command line tools. But Audio Commander's page...