Questions tagged [libsndfile]

libsndfile is a cross platform C library for reading and writing digital sampled sound. It supports main common file formats like WAV, PCM, AIFF, AU, as well as FLAC and Ogg/Vorbis.

Tag usage

When asking questions about usage of libsndfile, please include:

  • Target system and compiler information. This includes the compiler name, version and settings used to compile.

  • libsndfile version and release number.


Website: http://www.mega-nerd.com/libsndfile

164 questions
1
vote
1 answer

PortAudio: Playback lag at default frames-per-buffer

I'm trying to play audio in Go, asynchronously, using PortAudio. As far as I'm aware PortAudio handles its own threading, so I don't need to use any of Go's build-in concurrency stuff. I'm using libsndfile to load the file (also Go bindings). Here…
Joel Auterson
  • 728
  • 1
  • 7
  • 26
1
vote
1 answer

Linking 64bit sndfile lib in codeblocks under windows

I have an openframeworks project, which runs fine on OS X with sndfile, however under Windows, I have trouble with the linking. I've succesfully compiled a simple standalone project with the 32bit version, with these steps: Added the lib file in…
Endanke
  • 867
  • 13
  • 24
1
vote
1 answer

Sound recorded is slower that the original one

I'm trying to implement a loop feature. Basically I save the music sample in a buffer. Then when I press the loop in button I set the initial loop in time, when press the loop out set the loop out time. To get the loop part i make loop out time -…
Stefano Vuerich
  • 996
  • 1
  • 7
  • 28
1
vote
1 answer

Armadillo load wav file to mat

I want to read wav file into mat using Armadillo. It looks like wavread function in matlab: [sample_data,sample_rate] = wavread('test.wav'); sample_data = sample_data(1 : sample_rate * 1.5); Seems Armadillo doesn't support this, so I tried to use…
ductran
  • 10,043
  • 19
  • 82
  • 165
1
vote
1 answer

Building libsndfile in Fedora with Ogg Flac and Vorbis

I'm trying to build the libsndfile library in Fedora 20 with the added options of Flac, Ogg and Vorbis. So, as the readme says I installed flac ogg and vorbis using this command: sudo yum install flac libogg libvorbis After that I did the…
Dries
  • 995
  • 2
  • 16
  • 45
1
vote
0 answers

Resample PCM network stream to 8000Hz 8-bit mono via libsndfile sf_open_virtual function

My goal is to take a PCM stream in Node.js that is, even for example, 44100Hz 16 bit stereo, and then resample it to 8000 Hz 8 bit mono to then be encoded into Opus and then streamed. My thought was to try making bindings for libsndfile in C++ and…
Mikey A. Leonetti
  • 2,834
  • 3
  • 22
  • 36
1
vote
1 answer

Varispeed with Libsndfile, Libsamplerate and Portaudio in C

I'm working on an audio visualizer in C with OpenGL, Libsamplerate, portaudio, and libsndfile. I'm having difficulty using src_process correctly within my whole paradigm. My goal is to use src_process to achieve Vinyl Like varispeed in real time…
1
vote
2 answers

How to write 24 bit pcm samples in sndfile?

I have file which is opened with SF_FORMAT_WAV|SF_FORMAT_FLOAT but have samples in 24 bit format. Sndfile docs says that the data type used by the calling program and the data format of the file do not need to be the same so using sf_write_int() i…
Bojan Malinić
  • 137
  • 1
  • 2
  • 9
1
vote
3 answers

Writing a raw audio to a file?

I'm writing a piece of code in C for pocketsphinx module of freeswitch to save the utterance (waveform or audio) to a file. I receive the audio as a void *data and its unsigned int len and I have to save it as a RAW (or PCM) file (no headers). How…
codedrunk
  • 43
  • 7
1
vote
1 answer

portaudio/libsndfile framesperbuffer variable

Can any one tell me what does portaudio callback function variable framesperbuffer is? If i want to play audio stream through PA_WriteStream() by 64 bytes data every iteration then what value i should put in the framesperbuffer? Also in…
1
vote
0 answers

libsndfile: Read wav skipping JUNK chunk

I had been using libsndfile library. But only recently, I found some of my wav files have this extra JUNK section inside and libsndfile is not categorizing it as JUNK but simply reading this as data. The structure of my wav file is shown here: . I…
user1082170
  • 323
  • 2
  • 13
1
vote
2 answers

writing to a wav file using libsndfile

I'm having trouble writing a short buffer into a wav file on my HD. I followed a few tutorials, but they all give different ways of doing it. Anyway, this is the way I implemented it but for some reason it doesn't work. When I try to print out the…
nevos
  • 907
  • 1
  • 10
  • 22
1
vote
1 answer

Get rid of DLLs with source code?

I'd like to use LibSndFile in my project. It provides a set of dlls for x32 and x64 but I'd like to get rid of dlls. Is it possible to build .lib files from the source codes and then get rid of the dll? I don't want .dlls because you have to copy…
IonOne
  • 385
  • 4
  • 15
1
vote
1 answer

Compile SoX With CoreAudio On Win7 64-bit With Cygwin

I can't quite figure out how to get SoX to compile with CAF support. I have the libsndfile compiled and in the library folder gcc looks for. I compiled libsndfile like this: ./configure --build=x86_64 --disable-shared --enable-static and that…
Ace Frahm
  • 272
  • 1
  • 11
1
vote
1 answer

Problems with the function "sf_readf_float" of library "sndfile.h"

I have a project about speech recognition. Although I used library "sndfile.h", I am stuck in reading input sound. I have a question: the data which was read by function sf_readf_float() is time-domain signal, isn't it? If not, then what is it? Is…
user2530847
  • 49
  • 2
  • 12