Changeset 350
- Timestamp:
- Nov 29, 2007, 5:12:16 PM (17 years ago)
- Location:
- code/branches/audio
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/audio/CMakeLists.txt
r345 r350 50 50 FIND_PACKAGE(Boost) 51 51 FIND_PACKAGE(OpenAL) 52 FIND_PACKAGE(ALUT) # Only for testing on my machine 52 53 53 54 #Sets the search paths for the linking 54 LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${OPENAL_LIB_DIR} ${ Boost_LIBRARY_DIRS} ${OPENAL_LIBRARY} core objects loader network weapon classHierarchy audio openal alut)55 LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${OPENAL_LIB_DIR} ${ALUT_LIB_DIR} ${Boost_LIBRARY_DIRS} ${OPENAL_LIBRARY} core objects loader network weapon classHierarchy audio openal alut) 55 56 #Sets the search path for include files 56 57 INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR}) -
code/branches/audio/src/audio/AudioBuffer.cc
r349 r350 5 5 AudioBuffer::AudioBuffer(std::string fileName) 6 6 { 7 7 // Load wav data into buffers. 8 alGenBuffers(1, &buffer); 9 10 if(alGetError() != AL_NO_ERROR) 11 loaded=AL_FALSE; 12 13 alutLoadWAVFile((ALbyte*)fileName.c_str(), &format, &data, &size, &freq, &loop); 14 alBufferData(buffer, format, data, size, freq); 15 alutUnloadWAV(format, data, size, freq); 16 17 // Do another error check and return. 18 if(alGetError() != AL_NO_ERROR) 19 loaded=AL_FALSE; 20 21 loaded=AL_TRUE; 8 22 } 9 23 -
code/branches/audio/src/audio/AudioBuffer.h
r349 r350 19 19 private: 20 20 // Buffers hold sound data. 21 ALuint data;21 ALuint buffer; 22 22 // Identifier 23 23 std::string name; 24 // True if AL was able to load data 25 ALboolean loaded; 26 27 ALenum format; 28 ALsizei size; 29 ALvoid* data; 30 ALsizei freq; 31 ALboolean loop; 24 32 }; 25 33 }
Note: See TracChangeset
for help on using the changeset viewer.