Glunn11
Jul 15 2007, 05:52 PM
Hello BC!
I have recently downloaded, compiled, and installed the OSALP (Open-Source Audio Library Project) libraries on my computer. Supposedly, you can then #include them in any C++ file, like so:
#include <aflibWavFile>
When I do this, my program does not recognize the file or directory. What am I doing wrong?
Thanks!
groovicus
Jul 15 2007, 08:52 PM
Classpath issue. Put the libraries with the rest of the libraries. that's about as helpful as I can be because I have no idea what sort of a setup you have.
Glunn11
Jul 16 2007, 03:03 PM
Alright, thanks! I managed to do the #include, but I don't understand the documentation on how to actually play the dang WAV file! x_X All it describes is what the header file contains, which does me no good, since I'm not up to date on the C++ jargon.
groovicus
Jul 16 2007, 05:50 PM
What I usually do in a situation like this is to try and search for a code sample that uses that library. odds are good that you will find something close enough that you will be able to figure out what to do.
Glunn11
Jul 17 2007, 09:57 AM
No such luck... apparently the library isn't too popular, I guess.
Here's the header file for <aflibWavFile.h>:
/*
* Copyright: © 2000-2001 Bruce W. Forsberg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Bruce Forsberg forsberg@tns.net
*
*/
/*! \class aflibWavFile
\brief Derived class to read and write WAVE audio files.
This class will read and write audio files of the WAVE (Microsoft Waveform Audio
File Format) format. This module uses the audiofile library to support WAVE. Currently
it supports uncompressed PCM format and G.711 alaw and ulaw at this time.
*/
#ifndef _AFLIBWAVFILE_H
#define _AFLIBWAVFILE_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "aflibFile.h"
#include <audiofile.h>
class aflibWavFile : public aflibFile {
public:
aflibWavFile();
~aflibWavFile();
aflibStatus
afopen(
const char * file,
aflibConfig* cfg);
aflibStatus
afcreate(
const char * file,
const aflibConfig& cfg);
aflibStatus
afread(
aflibData& data,
long long position = -1);
aflibStatus
afwrite(
aflibData& data,
long long position = -1);
bool
isDataSizeSupported(aflib_data_size size);
bool
isEndianSupported(aflib_data_endian end);
bool
isSampleRateSupported(int& rate);
private:
AFfilehandle _handle;
long long _total_samples;
};
#endif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.