diff --git a/code/nel/samples/CMakeLists.txt b/code/nel/samples/CMakeLists.txt index 4f38264a0..5abcd985a 100644 --- a/code/nel/samples/CMakeLists.txt +++ b/code/nel/samples/CMakeLists.txt @@ -17,5 +17,5 @@ IF(WITH_PACS) ENDIF(WITH_PACS) IF(WITH_SOUND) - ADD_SUBDIRECTORY(sound_sources) + ADD_SUBDIRECTORY(sound) ENDIF(WITH_SOUND) diff --git a/code/nel/samples/sound/CMakeLists.txt b/code/nel/samples/sound/CMakeLists.txt new file mode 100644 index 000000000..2375331f5 --- /dev/null +++ b/code/nel/samples/sound/CMakeLists.txt @@ -0,0 +1,4 @@ + +ADD_SUBDIRECTORY(sound_sources) +ADD_SUBDIRECTORY(stream_ogg_vorbis) + diff --git a/code/nel/samples/sound_sources/CMakeLists.txt b/code/nel/samples/sound/sound_sources/CMakeLists.txt similarity index 85% rename from code/nel/samples/sound_sources/CMakeLists.txt rename to code/nel/samples/sound/sound_sources/CMakeLists.txt index 4cf1ea427..b0f481e7c 100644 --- a/code/nel/samples/sound_sources/CMakeLists.txt +++ b/code/nel/samples/sound/sound_sources/CMakeLists.txt @@ -7,7 +7,7 @@ ADD_DEFINITIONS(-DNL_SOUND_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_sound/\\"" ${LI INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nl_sample_sound_sources nelmisc nelsound) -NL_DEFAULT_PROPS(nl_sample_sound_sources "NeL, Samples: Sound System") +NL_DEFAULT_PROPS(nl_sample_sound_sources "NeL, Samples: Sound: Sound Sources") NL_ADD_RUNTIME_FLAGS(nl_sample_sound_sources) INSTALL(TARGETS nl_sample_sound_sources RUNTIME DESTINATION bin COMPONENT samplessound) diff --git a/code/nel/samples/sound_sources/data/DFN/alpha.typ b/code/nel/samples/sound/sound_sources/data/DFN/alpha.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/alpha.typ rename to code/nel/samples/sound/sound_sources/data/DFN/alpha.typ diff --git a/code/nel/samples/sound_sources/data/DFN/angle.typ b/code/nel/samples/sound/sound_sources/data/DFN/angle.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/angle.typ rename to code/nel/samples/sound/sound_sources/data/DFN/angle.typ diff --git a/code/nel/samples/sound_sources/data/DFN/backgound_sound_item.dfn b/code/nel/samples/sound/sound_sources/data/DFN/backgound_sound_item.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/backgound_sound_item.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/backgound_sound_item.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/background_flag_config.dfn b/code/nel/samples/sound/sound_sources/data/DFN/background_flag_config.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/background_flag_config.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/background_flag_config.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/background_sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/background_sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/background_sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/background_sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/basics/_typ.dfn b/code/nel/samples/sound/sound_sources/data/DFN/basics/_typ.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/_typ.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/basics/_typ.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/basics/_type.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/_type.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/_type.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/_type.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/boolean.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/boolean.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/boolean.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/boolean.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/filename.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/filename.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/filename.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/filename.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/float.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/float.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/float.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/float.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/iboolean.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/iboolean.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/iboolean.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/iboolean.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/int.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/int.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/int.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/int.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/string.typ b/code/nel/samples/sound/sound_sources/data/DFN/basics/string.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/string.typ rename to code/nel/samples/sound/sound_sources/data/DFN/basics/string.typ diff --git a/code/nel/samples/sound_sources/data/DFN/basics/typ.dfn b/code/nel/samples/sound/sound_sources/data/DFN/basics/typ.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/basics/typ.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/basics/typ.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/complex_sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/complex_sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/complex_sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/complex_sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/context_sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/context_sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/context_sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/context_sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/direction.dfn b/code/nel/samples/sound/sound_sources/data/DFN/direction.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/direction.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/direction.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/distance.typ b/code/nel/samples/sound/sound_sources/data/DFN/distance.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/distance.typ rename to code/nel/samples/sound/sound_sources/data/DFN/distance.typ diff --git a/code/nel/samples/sound_sources/data/DFN/doppler.typ b/code/nel/samples/sound/sound_sources/data/DFN/doppler.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/doppler.typ rename to code/nel/samples/sound/sound_sources/data/DFN/doppler.typ diff --git a/code/nel/samples/sound_sources/data/DFN/gain.typ b/code/nel/samples/sound/sound_sources/data/DFN/gain.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/gain.typ rename to code/nel/samples/sound/sound_sources/data/DFN/gain.typ diff --git a/code/nel/samples/sound_sources/data/DFN/listener.dfn b/code/nel/samples/sound/sound_sources/data/DFN/listener.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/listener.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/listener.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/mixer_config.dfn b/code/nel/samples/sound/sound_sources/data/DFN/mixer_config.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/mixer_config.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/mixer_config.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/music_sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/music_sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/music_sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/music_sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/parameter_id.typ b/code/nel/samples/sound/sound_sources/data/DFN/parameter_id.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/parameter_id.typ rename to code/nel/samples/sound/sound_sources/data/DFN/parameter_id.typ diff --git a/code/nel/samples/sound_sources/data/DFN/pattern_mode.typ b/code/nel/samples/sound/sound_sources/data/DFN/pattern_mode.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/pattern_mode.typ rename to code/nel/samples/sound/sound_sources/data/DFN/pattern_mode.typ diff --git a/code/nel/samples/sound_sources/data/DFN/priority.typ b/code/nel/samples/sound/sound_sources/data/DFN/priority.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/priority.typ rename to code/nel/samples/sound/sound_sources/data/DFN/priority.typ diff --git a/code/nel/samples/sound_sources/data/DFN/rolloff.typ b/code/nel/samples/sound/sound_sources/data/DFN/rolloff.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/rolloff.typ rename to code/nel/samples/sound/sound_sources/data/DFN/rolloff.typ diff --git a/code/nel/samples/sound_sources/data/DFN/simple_sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/simple_sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/simple_sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/simple_sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/sound.dfn b/code/nel/samples/sound/sound_sources/data/DFN/sound.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/sound.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/sound.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/sound_group.dfn b/code/nel/samples/sound/sound_sources/data/DFN/sound_group.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/sound_group.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/sound_group.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/sound_group_item.dfn b/code/nel/samples/sound/sound_sources/data/DFN/sound_group_item.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/sound_group_item.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/sound_group_item.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/soundbank.dfn b/code/nel/samples/sound/sound_sources/data/DFN/soundbank.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/soundbank.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/soundbank.dfn diff --git a/code/nel/samples/sound_sources/data/DFN/transposition.typ b/code/nel/samples/sound/sound_sources/data/DFN/transposition.typ similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/transposition.typ rename to code/nel/samples/sound/sound_sources/data/DFN/transposition.typ diff --git a/code/nel/samples/sound_sources/data/DFN/user_var_binding.dfn b/code/nel/samples/sound/sound_sources/data/DFN/user_var_binding.dfn similarity index 100% rename from code/nel/samples/sound_sources/data/DFN/user_var_binding.dfn rename to code/nel/samples/sound/sound_sources/data/DFN/user_var_binding.dfn diff --git a/code/nel/samples/sound_sources/data/animations/readme.txt b/code/nel/samples/sound/sound_sources/data/animations/readme.txt similarity index 100% rename from code/nel/samples/sound_sources/data/animations/readme.txt rename to code/nel/samples/sound/sound_sources/data/animations/readme.txt diff --git a/code/nel/samples/sound_sources/data/animations/test_anim.sound_anim b/code/nel/samples/sound/sound_sources/data/animations/test_anim.sound_anim similarity index 100% rename from code/nel/samples/sound_sources/data/animations/test_anim.sound_anim rename to code/nel/samples/sound/sound_sources/data/animations/test_anim.sound_anim diff --git a/code/nel/samples/sound_sources/data/background_sounds/background_sound.primitive b/code/nel/samples/sound/sound_sources/data/background_sounds/background_sound.primitive similarity index 100% rename from code/nel/samples/sound_sources/data/background_sounds/background_sound.primitive rename to code/nel/samples/sound/sound_sources/data/background_sounds/background_sound.primitive diff --git a/code/nel/samples/sound_sources/data/background_sounds/readme.txt b/code/nel/samples/sound/sound_sources/data/background_sounds/readme.txt similarity index 100% rename from code/nel/samples/sound_sources/data/background_sounds/readme.txt rename to code/nel/samples/sound/sound_sources/data/background_sounds/readme.txt diff --git a/code/nel/samples/sound_sources/data/cluster_sound/readme.txt b/code/nel/samples/sound/sound_sources/data/cluster_sound/readme.txt similarity index 100% rename from code/nel/samples/sound_sources/data/cluster_sound/readme.txt rename to code/nel/samples/sound/sound_sources/data/cluster_sound/readme.txt diff --git a/code/nel/samples/sound_sources/data/cluster_sound/test_clusters.sound_group b/code/nel/samples/sound/sound_sources/data/cluster_sound/test_clusters.sound_group similarity index 100% rename from code/nel/samples/sound_sources/data/cluster_sound/test_clusters.sound_group rename to code/nel/samples/sound/sound_sources/data/cluster_sound/test_clusters.sound_group diff --git a/code/nel/samples/sound_sources/data/default.mixer_config b/code/nel/samples/sound/sound_sources/data/default.mixer_config similarity index 100% rename from code/nel/samples/sound_sources/data/default.mixer_config rename to code/nel/samples/sound/sound_sources/data/default.mixer_config diff --git a/code/nel/samples/sound_sources/data/samplebank/base_samples/beep.wav b/code/nel/samples/sound/sound_sources/data/samplebank/base_samples/beep.wav similarity index 100% rename from code/nel/samples/sound_sources/data/samplebank/base_samples/beep.wav rename to code/nel/samples/sound/sound_sources/data/samplebank/base_samples/beep.wav diff --git a/code/nel/samples/sound_sources/data/samplebank/base_samples/tuut.wav b/code/nel/samples/sound/sound_sources/data/samplebank/base_samples/tuut.wav similarity index 100% rename from code/nel/samples/sound_sources/data/samplebank/base_samples/tuut.wav rename to code/nel/samples/sound/sound_sources/data/samplebank/base_samples/tuut.wav diff --git a/code/nel/samples/sound_sources/data/soundbank/beep.sound b/code/nel/samples/sound/sound_sources/data/soundbank/beep.sound similarity index 100% rename from code/nel/samples/sound_sources/data/soundbank/beep.sound rename to code/nel/samples/sound/sound_sources/data/soundbank/beep.sound diff --git a/code/nel/samples/sound_sources/data/soundbank/tuut.sound b/code/nel/samples/sound/sound_sources/data/soundbank/tuut.sound similarity index 100% rename from code/nel/samples/sound_sources/data/soundbank/tuut.sound rename to code/nel/samples/sound/sound_sources/data/soundbank/tuut.sound diff --git a/code/nel/samples/sound_sources/data/world_editor_classes.xml b/code/nel/samples/sound/sound_sources/data/world_editor_classes.xml similarity index 100% rename from code/nel/samples/sound_sources/data/world_editor_classes.xml rename to code/nel/samples/sound/sound_sources/data/world_editor_classes.xml diff --git a/code/nel/samples/sound_sources/main.cpp b/code/nel/samples/sound/sound_sources/main.cpp similarity index 100% rename from code/nel/samples/sound_sources/main.cpp rename to code/nel/samples/sound/sound_sources/main.cpp diff --git a/code/nel/samples/sound/stream_ogg_vorbis/CMakeLists.txt b/code/nel/samples/sound/stream_ogg_vorbis/CMakeLists.txt new file mode 100644 index 000000000..51fdccb66 --- /dev/null +++ b/code/nel/samples/sound/stream_ogg_vorbis/CMakeLists.txt @@ -0,0 +1,12 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_EXECUTABLE(nl_sample_stream_ogg_vorbis ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(nl_sample_stream_ogg_vorbis nelmisc nelsound) +NL_DEFAULT_PROPS(nl_sample_stream_ogg_vorbis "NeL, Samples: Sound: Stream OGG Vorbis") +NL_ADD_RUNTIME_FLAGS(nl_sample_sound_sources) + +INSTALL(TARGETS nl_sample_stream_ogg_vorbis RUNTIME DESTINATION bin COMPONENT samplessound) + diff --git a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp index 441eee932..7d200635a 100644 --- a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp +++ b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp @@ -48,7 +48,7 @@ #define NL_SOUND_DATA "." #endif // NL_SOUND_DATA -#define SAMPLE_OGG "O:/src/samples/music_stream/data/aeon_1_10_mystic_river.ogg" +#define SAMPLE_OGG "D:/source/kaetemi/toverhex/src/samples/music_stream/data/aeon_1_10_mystic_river.ogg" using namespace std; using namespace NLMISC; @@ -430,7 +430,7 @@ static void runSample() printf("End of song\n"); printf("Press ANY key to exit\n"); - while (!_kbhit()) { s_AudioMixer->update(); Sleep(10); } _getch(); + while (!_kbhit()) { s_AudioMixer->update(); nlSleep(10); } _getch(); return; }