audio,portability,file-format , Is WAV format the equivalent to BMP in terms of portability? [closed]


Is WAV format the equivalent to BMP in terms of portability? [closed]

Question:

Tag: audio,portability,file-format

There are a lot of different file formats to store sound, some compressed, some compatible with specific platforms, etc... The same thing applies to image file format. Now I know that the BMP (bitmap) file format basically stores a 2D array of pixels which is the image basically, without compression or extra features, and as a result is supported by almost any operation system. Is the WAV file format the equivalent to that in the audio world? And if not what is?


Answer:

In most cases they are pretty similar in concept. Wave format has a standardized header that describes the format of the data, followed by the audio data. One of the fields of the header indicates the audio format. A typical wave file will have an audio format of PCM (1) which means the data is unencoded PCM audio samples. All other values of the audio format indicate that there is some type of compression. Compressed wave files are not very common though but any program that expects to read a wave file needs to at least detect the wave format and error out if it doesn't support a supplied format.

The page WAVE PCM sound file format gives a pretty decent overview of the format for PCM.

I think it is fair to say, at this point, that most audio apps across various operating systems are going to understand wave files. Also, the format is so simple that you don't necessarily need a library to read or write the format in your own program.


Related:


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...

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,...

“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();...

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...

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()...

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....

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...

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;...

Is it safe to use Bash 4 features in news scripts?


bash,portability
Bash4 offers some nice features like globstar, associative arrays, the mapfile builtin etc. Will it greatly decrease the portability of my scripts if I make use of these features? Is it safer to stick to Bash 3?...

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...

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...

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>...

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...

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...

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...

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...

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...

fread(), solaris to unix portability and use of uninitialised values


c,linux,memory,stack,portability
Valgrind found the following error and I, after reading the documentation, the code and other questions in here couldn't figure it out why. Valgrind: first warning ~$ valgrind --vgdb=yes --vgdb-error=0 --read-var-info=yes --leak-check=yes --track-origins=yes debitadmin* debitadmin ==20720== Conditional jump or move depends on uninitialised value(s) ==20720== at 0x4013BC6: initialise (dbg.c:199) ==20720==...

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...

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...

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...

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...

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...

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...

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...

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"...

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...

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 =...

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...

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...

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...

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...

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();...

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?...

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);...

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 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...

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>...

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...

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...

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...

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");...

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>...

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,...

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...

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...

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...

mixing openssl API and BSD sockets API


c,sockets,unix,openssl,portability
I'm writing a client that must deal with both ordinary http protocol and also https for secure connections. For ordinary http connections, I should use basic socket I/O functions such as send(), recv() and so on. But for https connections, I should use SSL_read(), SSL_write and other functions from the...

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...