Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Osalp


  • Please log in to reply
4 replies to this topic

#1 Glunn11

Glunn11

  • Members
  • 262 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Idaho
  • Local time:02:16 PM

Posted 15 July 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!

BC AdBot (Login to Remove)

 


m

#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:16 PM

Posted 15 July 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. :thumbsup:

#3 Glunn11

Glunn11
  • Topic Starter

  • Members
  • 262 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Idaho
  • Local time:02:16 PM

Posted 16 July 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.

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:16 PM

Posted 16 July 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.

#5 Glunn11

Glunn11
  • Topic Starter

  • Members
  • 262 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Idaho
  • Local time:02:16 PM

Posted 17 July 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

Edited by Glunn11, 17 July 2007 - 09:57 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users