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
2
votes
1 answer

ImportError: DLL load failed regarding sndlib / libsndfile

I am using Windows 7 64 bit. I have these imports from scikits.audiolab import Sndfile import numpy as NumpyObj import matplotlib.pyplot as plt from itertools import groupby import heapq import datetime import time from math import sqrt…
Zurechtweiser
  • 1,165
  • 2
  • 16
  • 29
2
votes
2 answers

Undefined Symbol: _sf_open (Simple audio stuff on OSX)

I'm trying to get into C++ programming, and I'm quite struggling against the little details. Right now, I'm trying to get the snippet below to work, and apparently it will compile, but not link. (error message is a the bottom of this post) I'm using…
winsmith
  • 20,791
  • 9
  • 39
  • 49
2
votes
3 answers

Getting soundfile.LibsndfileError: Error opening 'speech.wav': Format not recognized when giving 2D numpy array to soundfile

Tried generating audio from tensors generated from NVIDIA TTS nemo model before running into the error: Here is the code for it: import soundfile as sf from nemo.collections.tts.models import FastPitchModel from nemo.collections.tts.models import…
Jacob Mukiti
  • 23
  • 1
  • 5
2
votes
1 answer

Extracting RIFF data from both .wav and .flac files

Wave files can contain unofficial metadata, such as Sampler Chunk - "smpl": https://sites.google.com/site/musicgapi/technical-documents/wav-file-format#smpl These are used for audio looping players and samplers avoiding to loading multiple…
Kim T
  • 5,770
  • 1
  • 52
  • 79
2
votes
2 answers

Dependency Issues with ALSA (libao and sndfile)

I have written a small program to play PCM audio files using a reference from github with slight modifications for my application. The program is compiling fine, but I am having a few runtime issues regarding dependencies and ALSA devices. The…
newmsrd
  • 43
  • 6
2
votes
1 answer

Cannot import soundfile (mac)

I get an error when I try import soundfile. I tried reinstalling soundfile via pip, but didn't work. Here's the error I get. Traceback (most recent call last): File "/Users/kona/.pyenv/versions/3.9.5/lib/python3.9/site-packages/soundfile.py", line…
salfare
  • 31
  • 2
2
votes
1 answer

cmake cannot find libsndfile

Cmake seems not to find the lib libsndfile. However, it installed on my machine. find_library(sndfile REQUIRED) And installed : yum list installed | grep libsnd libsndfile.x86_64 1.0.25-11.el7 @base …
mm98
  • 409
  • 1
  • 6
  • 18
2
votes
2 answers

How to read/write high-resolution (24-bit, 8 channel) .wav files in Java?

I'm trying to write a Java application that manipulates high resolution .wav files. I'm having trouble importing the audio data, i.e. converting the .wav file into an array of doubles. When I use a standard approach an exception is…
dB'
  • 7,838
  • 15
  • 58
  • 101
2
votes
1 answer

Playing a stereo .wav file with PortAudio & sndfile, output is fuzzy and pitched down / slowed

I've been writing some code to play back a stereo .wav file in c++ using PortAudio and sndfile, but the output sound is fuzzy and pitched down (pitch down is less of an issue for me but it may be part of the problem). It almost seems like its…
2
votes
1 answer

Can not compile libsndfile code on ubuntu

This is my first post. I need to manipulate audios for my project so I decided to use libsnfile. I already installed it but when I try to compile any .c program with gcc somefile.c or gcc `pkg-config sndfile` somefile.c it gives me "undefined" error…
Mario
  • 21
  • 3
2
votes
2 answers

Bad Format Using hsndfile (libsndfile)

I'm trying to use hsndfile (the Haskell binding for libsndfile) to generate a .wav file, and I've reached yet another hump I can't get past. The following code throws the error "Bad format." (as written in openWavHandle). I've tried every…
Andy
  • 3,132
  • 4
  • 36
  • 68
2
votes
2 answers

libsndfile usage joining and mixing .wav files

I need help getting started with libsndfile. I have four .wav files (all the same sample rate). I want to join the first two together,then the next two together, Then mix the resulting 2 .wav files into one.
james
  • 2,595
  • 9
  • 43
  • 70
2
votes
1 answer

Java equivalent of C++ sf_readf_double()

I'm manipulating .wav audio files in Android. So far things are going well (I can record a .wav file from the mic, add echoes etc.), but I'd like to mimic the behaviour of sf_readf_double() and sf_writef_double as per libsndfile in C++ to implement…
fredley
  • 32,953
  • 42
  • 145
  • 236
2
votes
2 answers

FFT of wav file using C++ / Python

I have been googling extensively and could plot the FFT of my wav file using Python but am unable to do so for C++, which I originally had to do. I downloaded and linked the FFTW and LIBSND to Visual C++. Though I am not understanding which…
Shivansh Jagga
  • 1,541
  • 1
  • 15
  • 24
2
votes
1 answer

Undefined reference and bad reloc address when linking to libsndfile

In a project project I am working on, I need to be able to open and read content from audio files (at least WAV files). I installed libsndfile using the Win64 installer from mega-nerd.com, and created a simple C program that opens and closes an…
Jay B.
  • 31
  • 6
1 2
3
10 11