Questions tagged [sample-rate]

136 questions
3
votes
1 answer

How do you get the current sample rate of Windows audio playback?

I am using the Windows waveOut API (aka MME or Multimedia Extension) mmsystem.h. Some programs change the audio playback sample rate (eg. from 44.1kHz to 48kHz), and it would be very useful for my program to detect the current playback sample rate,…
Blake
  • 136
  • 1
  • 9
3
votes
0 answers

Sample rate & format conversion with LibAV API (libavresample)

I'm writing a code which will merge multiple audios (with different formats) and create a single audio. When i set the encoder sample_rate and sample_fmt same with the input videos i have no problem merging the audios. However as obvious, all of the…
buzyeli
  • 76
  • 6
3
votes
1 answer

Using a particle filter with multiple sensors with different sampling rates

Current situation: I have implemented a particle filter for an indoor localisation system. It uses fingerprints of the magnetic field. The implementation of the particle filter is pretty straight forward: I create all particles uniformly…
2
votes
0 answers

SoX: Premature EOF on .wav input file

I've got a bunch of WAV files and a script that copies them to another directory, but processes some of the files with SoX. The outputted files should all have 1 channel and have a sample rate of 44.1khz or less. Most of my files either have more…
Protofall
  • 163
  • 1
  • 1
  • 9
2
votes
1 answer

swift AVAudioEngine and AVAudioSinkNode sampleRate convert

I have been having issues with this for a while now, and have written the following swift file that can be run on as the main view controller file for an app. Upon execution, it will play a short blast of a 1kHz sine wave. It will simultaneously…
samp17
  • 453
  • 1
  • 4
  • 11
2
votes
0 answers

How can I get the bit depth/sample rate of audio JS?

I need to get the Sample Rate of Audio file, loaded by standard input element. I tried to use this function function func(e) { let reader = new FileReader(); reader.readAsArrayBuffer(e.files[0]); reader.onload = function(event) { …
Vera
  • 31
  • 1
  • 5
2
votes
0 answers

Is it possible to set the output audio sample rate for a video file created using AVMutableComposition and AVAssetExportSession?

I'm using AVMutableComposition and AVAssetExportSession to combine a silent MP4 video with a WAV audio file. The basic steps are: Create AVAssets for the video and audio Add tracks to the AVMutableComposition Add each AVAssets first track to a…
2
votes
1 answer

Changing sample rate of mp3 files

I have a large amount of mp3 files that are not the correct sample rate for the external hardware I want to use them in. Is there any way of changing them all in one go rather than file by file through audacity?
2
votes
1 answer

How can you get the sample rate frequency of the iphone accelerometer?

Is there a function or method to get the iphone's current sampling rate of the running accelerometer? I know how to set the iPhone accelerometer to a certain frequency, but I would like to verify that it is actually running at that frequency It…
jcpennypincher
  • 3,762
  • 5
  • 27
  • 44
2
votes
1 answer

Arduino UNOv3 synchronisation of GPS and IMU MPU6050

I am relatively new with Arduino and I want to: Set the frequency of the IMU to 100 Hz. Synchronise GPS and MPU6050 in order to get data at the same time: 1 set of IMU data and 1 set of GPS data -> 99 sets of IMU data. (//1 second) -> 1 set of…
2
votes
1 answer

Simultaneous recording and playback at different sample rates in iOS

I am working on an iOS app where audio recording and playback should happen simultaneously but at different sampling rates. Recording will be done through a connected USB Audio device, and playback is done through the inbuilt speaker. I am using…
2
votes
1 answer

Java - Determine number of bytes to read from wave file to get to timestamp

I have an AudioFormat object (returned from audioInputStream.getFormat()). I have a timestamp (in milliseconds) that I want to start reading from the corresponding wav file from. How do I determine how many bytes to read/skip from the…
CamHart
  • 2,998
  • 3
  • 24
  • 55
2
votes
0 answers

USB Audio confusion - What data rates are possible?

I'm new to USB development, and i'm quite confused about what data rates are realistic. I'm trying to develop an external sound card connected on an AVR32 processor, which supports USB Full Speed(12 Mb/s). I'll use USB audio class 1 to send the…
Wiingaard
  • 3,332
  • 3
  • 26
  • 58
2
votes
2 answers

Android - Audio Record - Sample rates

I developed a game for android that uses Audio Record to get the mic input. You can have a glance at https://play.google.com/store/apps/details?id=fixappmedia.micro The thing is that I'm using the following function to get the sample rates available…
jpaguerre
  • 1,020
  • 1
  • 12
  • 19
2
votes
1 answer

Audio samplerate converter using libsndfile and libsamplerate. Not sure if using function src_simple correctly

I have been building a simple samplerate converter in c using libsndfile and libsamplerate. I just cant seem to get the src_simple function of libsamplerate to work, whatever I try. I have striped back my code to be as simple as possible and it now…
OliD
  • 37
  • 1
  • 2
  • 5
1 2
3
9 10