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

Using the libsndfile library to read a WAV file in C++

I am using libsndfile in C++ to read a WAV file. There are two points I don't understand: How can I get the "Bits per sample" value for the WAV file in question? I read the documentation at the website http://www.mega-nerd.com/libsndfile/api.html,…
user2530847
  • 49
  • 2
  • 12
1
vote
1 answer

Why isn't this audio file being read with sf_read_double?

I am trying to separate each subdivision of a drum sequence into a separate array inside a 2d array (rows for which subdivision, columns for data in each subdivision). I determine how many samples per subdivision earlier in the code with user…
1
vote
1 answer

sndfile.h C CodeBlocks Windows 7

I'm working on CodeBlocks 12.11 on windows 7 (64 bit). I'm programming in C and i'm using the library: libsndfile (http://www.mega-nerd.com/libsndfile/api.html) to easily read a .wav and convert it to a double array. I ran the wizard of libsndfile…
Jorge
  • 30
  • 6
1
vote
1 answer

Error using WASAPI with PortAudio on Win7

I'm trying to use PortAudio and libsndfile to play .wav files in exclusive mode on my Windows 7 machine, but I'm getting error number -9984 "Incompatible host API specific stream info" . I've filled out the PaWasapiStreamInfo struct as…
Tyler_Storm
  • 113
  • 2
  • 7
1
vote
1 answer

libsndfile always segfaults when using sf_open_fd()

I am trying to stream audio for an application I am building but I have run into a snag with a library I am using. This library is libSndFile. The library always has a SEGFAULT whenever I call sf_open_fd(int fd, int mode, SF_INFO *info, int…
user1787379
  • 131
  • 2
  • 8
1
vote
2 answers

artifacts when mixing wav files with libsndfile

I am trying to implement a piece of software that mix piano samples. I want to create a wav file containing one sound, the other and a mix of both. I trunc the samples at one second so I have the following : [one second of sound 1][one second of…
1
vote
1 answer

Build libsndfile library for ARM architectures

I need to build libsndfile for use it in my audio engine on Iphone/Ipad. I've built it without error but for an i386 architecture so I've got some errors when I build my project : Undefined symbols for architecture i386: …
Dono
  • 522
  • 7
  • 11
1
vote
1 answer

C++ Program Not Reading Absolute Path in Visual Studio 2010

I have a C++ program not reading an absolute path in Visual Studio. The following code works on my desktop environment (Windows 7, Visual Studio 2010, 64 bit). However, on my macbook, I am running bootcamp and/or VMware for a Windows 7 64 bit…
GeekyOmega
  • 1,235
  • 6
  • 16
  • 34
1
vote
0 answers

Permissive sound file parsing library for iOS

Does anyone know of any sound file parsing libraries with permissive licenses so as to be used on iOS, as an alternative to libsndfile? Ideally I am looking for C/C++ code, but I would consider ObjC code as well. I am fine with a library being less…
eigen_enthused
  • 525
  • 6
  • 17
1
vote
1 answer

How to FFT a sound array correctly?

I am trying to get a list of frequencies present in an input audio sample. It seems I need to do an FFT to get this result, but I get odd answers when I FFT it (using FFTW): I get arrays containing mostly zeros with a few impossibly large elements…
Skyler
  • 909
  • 1
  • 10
  • 24
0
votes
0 answers

Lift the fog of confusion over installs, or How to install libsndfile on OSX 10.7.3 Lion?

This is a long post, so I'm putting a short summary with the question at the top. Lion has been out long enough that I can finally install most of the Python libraries etc. I need using binary installs. I'm stuck when it comes to libsndfile. …
LMO
  • 515
  • 7
  • 18
0
votes
1 answer

libsndfile on iOS

Nowdays I met a strange link problem when I try to use libsndfile on iOS: I've compiled libsndfile on MACOSX 10.6.8 and it passed all the checks. But when I added it to the Xcode and tried to compile it on iOS, I got these link warning and…
Hugo
  • 243
  • 5
  • 12
0
votes
0 answers

Play wav file with PortAudio and libsndfile

I'm writing a drum trigger detector in c++ with PortAudio and libsndfile. The part when the program detects the input and decides if the sound should be played is done but I have no idea how to implement the libsndfile version. The only thing I…
krystof
  • 1
  • 3
0
votes
0 answers

how should I apply libsndfile library in vscode?

I needed to use libsndfile library in C, and I am using MinGW compiler in VScode. I have set up the library by copying header files and .lib file in the project's sndfile directory. Then to use the library in my code, I edited my…
0
votes
0 answers

How to Add Configure Commands to Flutter Build or CMakeLists.txt When Building Flutter Plugin

I'm attempting to link libsndfile into my Flutter plugin via the flutter build command. My CMakeLists.txt file looks like this: cmake_minimum_required(VERSION 3.4.1) # set libsndfile direcotry set (LIBSNDFILE_DIR…
Kdigital
  • 3,795
  • 3
  • 28
  • 24