Commit Graph

43 Commits

Author SHA1 Message Date
ottona a5db74568f towards win buildability 2022-08-18 15:35:37 +02:00
areay 0933438816 Trigger onUpdate signal within cAudioManager. Added demo tutorial8. 2016-11-29 23:27:55 +13:00
Raynaldo Rivera 37eab63fcd Removed unneeded macros in the examples 2014-09-02 09:38:39 -07:00
unknown 95fa017f3d Uploading fixed tutorial 3. 2012-02-28 16:39:08 -07:00
Jonas Erlandsson c9cfd31b29 Linux compat changes.
Removed line 4-6 in CMake/InstallDependencies.cmake so Linux also get the macros.
Edited DependenciesSource/.../CMakeLists.txt to add -fPIC compiler option on Linux 64bit.
Edited all Examples/.../CMakeLists.txt to rename "Main.cpp" to "main.cpp".
Edited cAudio/include/cSTLAllocator.h to make the inclusion of cstddef.h explicit for gcc 2.6+.

Despite this you still need to copy Dependencies/include/OpenAL/alc.h to /usr/include/AL/alc.h (for Ubuntu or whatever path that is on your system) for it to compile if you are not running the development build of OpenAL.
2011-12-27 12:37:02 +01:00
Raynaldo Rivera 192adb025f Fixed a typo in the tutorials that prevented the examples from building correctly. 2011-08-24 01:28:31 -07:00
Raynaldo Rivera e3663f2ba6 Adding new examples directory structure. 2011-08-24 01:16:40 -07:00
Raynaldo Rivera 6dde5fd37e Clearing The cAudio trunk for the new cmake 2011-05-19 04:17:47 +00:00
Raynaldo Rivera d87d8fc969 Added all the osx project files for each example. 2010-03-16 01:32:42 +00:00
Joshua Jones 3b8704444a Comments and documentation.
Incremented the version in preparation for the next release.
2010-03-16 01:11:08 +00:00
Raynaldo Rivera bee6c8894d Adjusted the makefiles to work correctly. 2010-02-20 18:22:52 +00:00
Raynaldo Rivera ce77c9f932 Added the makefiles for linux... 2010-02-20 08:11:18 +00:00
Joshua Jones b1f2680420 Update to move default audio decoder and data source registration to creation of the audio manager. This way, plugins can always override default implementations of the default decoders/sources. 2010-02-20 03:19:59 +00:00
Raynaldo Rivera 857f2012b4 Fixed the linux build version. 2010-02-16 03:29:51 +00:00
Raynaldo Rivera b118bdc7ac Fixed the visual studio files to use the _d suffix 2010-02-16 03:00:21 +00:00
Raynaldo Rivera 30346e9df1 Finished fixing the cpb projects created new ones for 1-7 each has a debug and release for mingw and visual studio. Even added workspace for ease of compiling everything with codeblocks. 2010-02-16 02:46:27 +00:00
Raynaldo Rivera 24802ec8e9 Fixed tutorial 6 2010-02-14 23:56:48 +00:00
Raynaldo Rivera d9d36a8ced Added tutorial 7 2010-02-14 23:44:26 +00:00
Raynaldo Rivera cb9ae7a72c Added tutorial 6 shows how to use a custom event handler as well has removed OnInit from the audio source events. 2010-02-14 22:54:19 +00:00
Joshua Jones c5b1505822 Accidentally uploaded a tutorial file that reference a local test mp3. 2010-02-14 05:36:14 +00:00
Joshua Jones b096f1536b Rework of plugin system. Now works better with static linking. Plugin makers are now expected to pass back a fully implemented version of IAudioPlugin for cAudio to use. Create your plugin class with new, cAudio will call drop() on it on unload of your dll.
The MP3Decoder plugin has been updated for the above changes.
Removed the shim that used to exist between dll plugins and the manager.
2010-02-14 05:34:57 +00:00
Joshua Jones f69d925b4f Added ability to add effect presets. 2010-02-14 03:32:24 +00:00
Raynaldo Rivera 7cf3d7fb0e Changed the tutorails to say cAudio 2.0.0 instead of 1.7.1 2010-02-13 19:56:38 +00:00
Joshua Jones 3f06749573 Minor API changes to the manager, release is now releaseAllSources, createFromFile is now create.
Added the ability for the user to provide a DataSourceFactory, which cAudio will use to get audio data.  This interface can be overridden to provide cAudio the ability to read from zip archives, TCP streams, potentially any location.  DataSourceFactories can also be prioritized.
Made the existing FileSource a factory and registered it by default with the manager.  If the user wishes to prevent cAudio from reading from disk, unRegister the "FileSystem" data source.
Made tutorials conform with the changes to the API.
2010-02-13 05:48:19 +00:00
Joshua Jones 16f222c8a5 Changes to make sure undefining decoders and EFX actually removes all pieces of them. 2010-02-13 02:34:50 +00:00
Raynaldo Rivera f0a5c7411d Added support for adding custom data sources. using registerSource(const char* , IDataSource*) createFromSource(const char*) isSourceRegistered(cont char*) unRegisterSource(cont char*) 2010-02-11 15:29:40 +00:00
Raynaldo Rivera b317412796 changed the IAudio objects and cAudio objects to IAudioSource and cAudioSource 2010-02-10 21:57:09 +00:00
Raynaldo Rivera c261339e57 2010-02-09 05:33:32 +00:00
Raynaldo Rivera 1e914b9796 2010-02-09 04:18:39 +00:00
Joshua Jones 30e5b4a99e Added support for all OpenAL Audio Effects. Access can be gotten through the main audio manager using the AudioEffects interface. IEffect provides access to effect parameters and allows for binding to cAudio sources. IFilter provides access to filters that can be attached to sources and effects.
Added conversion functions from our audio format enum to OpenAL's in preparation for supporting more formats.
Reorganized cAudio defines, made it easier to access some compile time parameters.
Fixed a bug where a source could not be played again after it reached the end of its audio stream.
Added better checking for sources.  IsValid() should provide a more useful indication of whether a source is usable.
Added error checking and logging to cAudioCapture.
Prevented initializing of cAudioManager until shutdown() has been called.
Added a tutorial for Audio Effects.
Added a footsteps sound for showing off Audio Effects.
Moved the default compile location for the main library to lib/.  The msvc project will copy the cAudio.dll to bin/win32-visual/
2010-01-11 00:39:08 +00:00
Joshua Jones 2132eea8bf Added a small spreadsheet with performance information
Changed the 3d tutorial to use the move convenience function in order to have proper doppler effects.
Added relative seek ability to cAudio source.
Updated decoders to have a flag if the data they are working with is valid for their decoder (isValid).
Added reference counting to IAudio, IAudioDecoder, and IDataSource
Added better error checking in cAudio sources and they will do a better job of detecting if they are invalid.
Fixed the spelling on cWavAudioDecoderFactory.h
Ogg decoder support for the isValid check.
Time seek ability added to cRawDecoder
Rewrote cWavDecoder.  It will now read slightly malformed wav files (and conforms to the wav spec), no longer has a bug where 8 bit mono audio samples will play twice as fast as 16 bit mono samples, proper bounds checking to make sure only the audio data is sent to the audio source, and time seeking abilities.  The decoder does not support channels over 2, compressed wavs, wavs with more than 1 data or fmt block, or any other blocks that may be present in a wav file.  All unsupported blocks will be ignored.
2009-12-07 22:25:08 +00:00
Joshua Jones 4c76942a7f Changed IAudioManager to no longer use std::strings in the main interface. It now uses const char* strings. The reason this change was made was to make porting to other languages, or even use with other string libraries easier. std::string is no longer required to interface with the library.
Added a convenience function (move()) to the cAudio source, making it easier to move a source and do velocity for doppler effects with a single call.
Internally, audio sources are now stored in an std::vector for better performance.  This change also makes it so that it is no longer required for the user to name a source.  The user can pass NULL to name to avoid naming it.
Some documentation fixes.
Added a stress test app, allowing users and developers test how well cAudio performs under pressure.
2009-12-01 01:41:15 +00:00
Joshua Jones e1bf4ecc9a Updated the examples to use a better set of characters to denote the default device
Removed an unnecessary include in cAudioManager.h
Added a define to set the number of buffers used by an audio source
Added the last of the previously unsupported OpenAL source parameters (Cones, attenuation tweaking, max/min volume, and rolloff factor)
Cleaned up the implementation of cAudio source.  It no longer keeps a redundant copy of the state information and functions are now in order that they are defined.  Some functions have been renamed to be clearer.
Other changes throughout the code to support the changes to the cAudio source.
2009-11-28 03:58:24 +00:00
Joshua Jones cd1a2a61d9 Increased buffer size for audio sources from 32k to 64k.
Changed song used by Tutorial1_2DSound.
Added some comments.
Changed cVector3 to use a custom Episilon instead of including float.h (less bloat)
Added debug log entries to cAudio
Allowed cOggDecoder to return error values from decoding.  cAudio now handles those errors a little better.
2009-11-21 00:39:46 +00:00
Joshua Jones 6b3e9c5a9d Moved sample sounds to a media folder and removed the copy of bling.ogg from bin
Updated logger to allow a user to create callbacks to receive log messages
Logger also gives more information, time the message was sent, the source, the importance, and the message itself.
User can now query playback devices and specify the device for the audio manager to use.  The audio manager is no longer a singleton, although creating multiple managers is not advised.
Clean up and optimization of manager initialization code.
IAudioCapture can now be told which device to capture audio from.  The user can also create multiple IAudioCaptures to capture audio from multiple sources at the same time.
Added additional error checking.
A seperate thread is used to capture audio now.
Defines added to allow a user to remove support for default codecs.
2009-11-20 03:39:56 +00:00
Joshua Jones d0ff906bb0 Changed the 3D tutorial to actually rotate the sound around the listener 2009-08-29 22:09:34 +00:00
Joshua Jones 71e1e640b3 Made fixes to the release build of the library and examples to put files in the right places, remove debug information, and do full optimization. 2009-08-29 21:19:51 +00:00
Joshua Jones 75ece68dcf Added cross-platform Mutex and Thread classes.
Made cAudio, cAudioCapture, cAudioManager and other classes thread safe.
Made cAudioManager use a seperate update thread by default.
Added cAudioSleep, a cross-platform sleep() function
Moved global defines to cAudioDefines
Added defines to disable thread safety or the internal update thread if the user wishes it
Updated tutorials to reflect the changes made
2009-08-29 11:24:31 +00:00
Raynaldo Rivera 93e36c4a03 Updated tutorials to use cVector3 and the new getListener function 2009-08-26 02:55:02 +00:00
Joshua Jones 0c3df1d430 Added audio capture capabilities. The user can now get an interface for audio capture from cAudioManager and record audio from the default recording device.
Added a raw audio decoder, allowing raw audio to be played if the format and frequency is known.  Will also load from .raw files on disk, but will assume the format is 16 bit mono and the frequency is 22050 hz
Added a tutorial to show how recording and playback can be done.
Added the ability for the user to unregister audio codecs that they will not be using.  Also added methods to test for the existance of a decoder and get the decoder factory back.
Moved cVector3.h to include instead of Headers to make using it in user projects easier (one less include path)
Moved the audio format enum to its own header file.
Small fix in the wav decoder to prevent the file header from being played as audio data.
2009-08-11 17:57:20 +00:00
Joshua Jones 9933eee54c Added the missing msvc project files for the tutorials.
Added missing 3d vector class;
2009-08-08 05:53:29 +00:00
Joshua Jones 28a22c7f73 Fixed problem with the msvc project not outputting a .lib file.
Updated tutorials to fix minor bugs and pathing issues.  Also fixed crash bug on failure to create the audio object.
Added msvc projects for all tutorials.
Updated the listener class to be self contained and only handle stuff related to the OpenAL listener.  It does NOT init OpenAL anymore, that has been moved to cAudioManager.
Extended the listener class to support all settings that native OpenAL supports.
Cleaned up cFileSource and fixed a crash bug on NULL file handle
Fixed returning bad audio buffer chunk sizes from the cOggDecoder on errors in the ogg stream
Seeking can now be down in fractions of a second now, changed the seconds field from int to float
Fixed various odd formatting.
Fixed potential crash bug in cMemorySource if memory could not be allocated.
cMemorySource will no longer clear the buffer you give to it before filling it with data.  This prevents an overwrite from happening in case of error but the user should provide a zeroed buffer to cMemorySource anyway for safety.
Relative seeking is now supported by cOggDecoder.
2009-08-08 05:51:32 +00:00
Raynaldo Rivera 9cac8153da 2009-06-21 03:24:30 +00:00