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
0 answers

How can I fix LNK2019 error with libsndfile?

Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol _sf_open referenced in function "private: unsigned int __thiscall SoundBuffer::AddSoundEffect(char const *)"…
Ale
  • 13
  • 4
1
vote
1 answer

Installing libsndfile1 on docker container

I'm trying to install soundfile over pip install on my docker container. Sadly i need to install libsndfile1 manually over apt get by myself. This fails somehow and i don't really get why and does anyone know how to install it. I'm running docker…
Synoon
  • 2,297
  • 4
  • 22
  • 37
1
vote
1 answer

How can I open a sound file loaded in memory with libsndfile?

To understand this, I want to tell the following scenario: I designed a game and finished it. I encrypted the audio data with AES. I will then decrypt these encrypted files while the game is opening. These files are encoded in bytes in memory. For…
1
vote
1 answer

WAV writing function can't sync after writing to stereo

I'm trying to use the following function to create a 2-channel stereo .wav file from an interleaved input buffer. The function works fine when slightly modified to write to a 1-channel mono file, but in its current state it returns an exception…
1
vote
1 answer

LibSNDfile / Obeo audio recording Android not writing header correctly

I'm writing an Android application that records audio using Obeo and writes the wave file using libsndfile. I've verified that the audio stream data is proper by editing the Subchunk2Size which specifies the size of the data portion of the file.…
Seth
  • 180
  • 8
1
vote
1 answer

Alsa, unable to play the same track twice in sequence

I have developed some code to play audio (wave files). When I try to play the same file twice, it plays fine the first time but always fails when called the second time. Below is the one-time audio init function. /* PCM interface objects */ static…
1
vote
1 answer

How is the type sf_count_t in sndfile.h defined in libsndfile?

I am trying to work with Nyquist (a music programming platform, see: https://www.cs.cmu.edu/~music/nyquist/ or https://www.audacityteam.org/about/nyquist/) as a standalone program and it utilizes libsndfile (a library for reading and writing sound,…
1
vote
2 answers

Pyinstaller does not include libsndfile

I created an executable with this code and pyinstaller: import soundfile print("Hello!") input("Ok") But it doesn't run correctly. I get the following error: Traceback (most recent call last): File "lib\site-packages\soundfile.py", line 142, in…
dduque
  • 338
  • 4
  • 16
1
vote
2 answers

Link libsndfile source code with gcc

I just cloned libsndfile and created program.c file with the following contents: #include #include main() { printf("hello world"); } My goal is to get this file to compile using gcc (if indeed sndfile.h is the right header…
lonious
  • 676
  • 9
  • 25
1
vote
1 answer

Cannot link library with cmake and Visual Studio 2017

I cannot link external library to my project I have the following CMakeLists file add_executable(MyProg main.cpp) LINK_DIRECTORIES(winlib) message(STATUS "SND FILE ${libsndfile}") # Link target_link_libraries( MyProg libsndfile) I…
user4671628
1
vote
2 answers

Linking libsndfile library to Code::Blocks on Windows

I have installed sndfile from the Mega-Nerd website. After installing it I tried adding it to the Code Blocks using this method: How do I link to a library with Code::Blocks? The program still does not see the methods defined in the library giving…
Kokos34
  • 67
  • 1
  • 11
1
vote
2 answers

FFTW of double samples saved in file

I am trying to calculate FFT on 53k double samples using FFTW library and on it's basis guess what's the fundamental frequency of the signal. Samples are generated by sndfile library on the basis of wav input file (program loads in wav file,…
Kokos34
  • 67
  • 1
  • 11
1
vote
1 answer

Combining libsndfile and RtAudio?

So, i've been experimenting around with RtAudio and libsndfile. The task seemed to be simple: 1.) Read some samples into a buffer with libsndfile (using the SndfileHandle class and readf()) 2.) Use RtAudio to play back the samples BUT, for some…
TraaTrii
  • 31
  • 3
1
vote
2 answers

Libsndfile on OSX corrupts data

I've run into strange problems making a Libsndfile-based audio app on OSX. The data in read and written buffers got corrupted in strange and unpredictable ways. Here is a short program that reproduces the problem for me: #include…
Tim Kay
  • 11
  • 1
1
vote
1 answer

libsndfile library build error in VS 2012 Vc++ app project

I am creating Visual Studio VC++ app project on Win 7, that utilizes the libsndfile library. The library( libsndfile-1.dll,libsndfile-1.dll) is at : C:\SVN\US\AdditionalIncludeDir\libsndfile and its headers(sndfile.hh,sndfile.h)…
user915783
  • 689
  • 1
  • 9
  • 27