From 985dfb3e9d0b68cd9d11d0ee2f18e03ae57b2081 Mon Sep 17 00:00:00 2001 From: William Reading Date: Sat, 7 Jun 2003 14:12:47 +0000 Subject: [PATCH] Patches submitted by Tobias Diedrich in this e-mail: https://sourceforge.net/mailarchive/forum.php\?thread_id=2533169\&forum_id=2749 --- stepmania/Data/Translation.dat | 107 ++++-------------- stepmania/configure.ac | 11 +- stepmania/src/Makefile.am | 3 + stepmania/src/NotesLoaderDWI.cpp | 2 + .../src/arch/Sound/RageSoundDriver_OSS.cpp | 14 ++- stepmania/src/arch/arch_linux.h | 1 + 6 files changed, 42 insertions(+), 96 deletions(-) diff --git a/stepmania/Data/Translation.dat b/stepmania/Data/Translation.dat index db1c6f0294..949a30b53b 100644 --- a/stepmania/Data/Translation.dat +++ b/stepmania/Data/Translation.dat @@ -20,68 +20,6 @@ # changes. [Songs] - -# ChickenWing XX whatever... is really Chicken Wing -TitleFrom: Chicken Wing XX -TitleTo: Chicken Wing -ArtistTo: Banya -* -# SLAM XX is really SLAM... hmmm see a pattern yet? -TitleFrom: SLAM XX -TitleTo: SLAM -ArtistTo: Novasonic -* -# Holiday XX is really Holiday -TitleFrom: Holiday XX -TitleTo: Holiday -ArtistTo: F2 Original -* -# CanCan XX is really CanCan -TitleFrom: (CanCan XX)|(Can Can XX)|(Kang Kang XX)|(KangKang XX)|(Kang Kang)|(KangKang) -TitleTo: Can Can -ArtistTo: F2 Original -* -# Also... -TitleFrom: cancan -ArtistFrom: F2 Original -TitleTo: Can Can -* -ArtistFrom: Park Ji Yoon -ArtistTo: 박지윤 -* -# Baek Ji Young - Sad Salsa -ArtistFrom: Baek Ji Young -#TitleFrom: Sad Salsa -ArtistTo: 뱩지옝 -* -# Lee Hyun Do - Pierrot -#TitleFrom: Pierrot -#ArtistTo: 이혠도 -* -# Lee Hyun Do (most probably) -ArtistFrom: Lee Hyun Do -ArtistTo: 이혠도 -* -# Some versions of People Crew - YahWah have the name the wrong way round -# people aren't sure who the band is or what the song name is. -# for the record the band is People Crew (http://www.people-crew.co.kr) and -# the song is Yahwah -TitleFrom: People Crew -TitleTo: YahWah -ArtistTo: People Crew -* -TitleFrom: Yah ?Wah -ArtistTo: People Crew -* -TitleFrom: Flower Of Night -ArtistTo: People Crew -TitleTo: YahWah -* -# Yu Seung Jun - Hope Find You -TitleFrom: Hope Find You -ArtistTo: 유승준 -TitleTo: 잦길바래 -* # "Candy", "Candy star", or "Candy #". TitleFrom: Candy(( star)?|#) ArtistFrom: Luv.* @@ -201,8 +139,10 @@ TitleFrom: (Doors? of Magic)|(Mahou no Tobira) TitleTo: 魔法の扉 SubtitleTo: (スペース&planet;マコのテーマ) * +# No need to write transliterations for these. TitleFrom: Senorita TitleTo: SEÑORITA +DontTransliterate * TitleFrom: Senorita\(Speedy Mix\) TitleTo: SEÑORITA @@ -252,7 +192,7 @@ ArtistTo: くにたけみゆき ArtistFrom: Kunitake Miyuki ArtistTo: くにたけみゆき * -# Dreams Come True: +# DREAMS COME TRUE: TitleFrom: Asa ga Mata Kuru TitleTo: 朝がまた来る * @@ -269,26 +209,25 @@ TitleFrom: Ureshii! Tanoshii! Daisuki! TitleTo: うれしい! たのしい! 大好き! * # OHA: -ArtistFrom: War[ui]jiennu +ArtistFrom: Warijiennu ArtistTo: わるじぇんぬ * -ArtistFrom: Yama-?chan (with|&) Jimusasu ?hikaru +ArtistFrom: Yamachan with Jimusasuhikaru ArtistTo: やまちゃん with ジムナスひかる * TitleFrom: OHA OHA Sutaataa TitleTo: OHA OHA スターター * -ArtistFrom: Yama-?chan (with|&) (Reimondo|Raymond) +ArtistFrom: Yamachan & Reimondo ArtistTo: やまちゃん&レイモンド * -# Optional question mark at the end: -ArtistFrom: Oha Kids with Imakuni\?? +ArtistFrom: Oha Kids with Imakuni ArtistTo: おはおはキッズ with イマクニ * TitleFrom: Sayonara no Kawari Ni TitleTo: サヨナラのかわりに * -ArtistFrom: Oh?ha ?gumi +ArtistFrom: Ohhagumi ArtistTo: おはぐみ * ArtistFrom: Morikubo Shoutarou @@ -301,7 +240,7 @@ TitleTo: ゾナパラ SubtitleTo: WHY! パラパラ・リミックス ArtistTo: ゾベッカ * -# Tokimeki Memorial Dancing Summer Vacation +#TOKIMEKI MEMORIAL DANCING SUMMER VACATION TitleFrom: Anata ArtistFrom: Unknown TitleTo: あなたに会えて @@ -333,7 +272,7 @@ SubtitleTo: ~Dancing Summer Mix~ ArtistTo: 金月 真美 * TitleFrom: Olgore -ArtistFrom: Unkn?own +ArtistFrom: Unkown TitleTo: ときめきのオルゴーレ SubtitleTo: ~Dancing Summer Mix~ ArtistTo: 金月 真美 @@ -407,35 +346,35 @@ ArtistFrom: (Nobuo Uematsu)|(Uematsu Nobuo) ArtistTo: 植松伸夫 [Courses] -TitleFrom: (.*Kidou)|(Demon Road)|(Road of Oni)|(Oni Michi)|(MAX2 Kidou/Onimichi.*) +TitleFrom: (Kidou)|(Demon Road)|(Road of Oni)|(Oni Michi) TitleTo: 鬼道 * -TitleFrom: (.*Kidou 2)|(Demon Road 2)|(Road of Oni 2)|(Oni Michi 2) +TitleFrom: (Kidou 2)|(Demon Road 2)|(Road of Oni 2)|(Oni Michi 2) TitleTo: 鬼道 弐 * -TitleFrom: (Love Love)|(Love)|(.*Love Heart) +TitleFrom: Love TitleTo: Love ♡ * -TitleFrom: (2 ?MB)|(.*Road of 2 ?MB) +TitleFrom: Love Love +TitleTo: Love ♡ +* +TitleFrom: (2 ?MB)|(Road of 2 ?MB) TitleTo: 2MB道 * -TitleFrom: .*Dancemania( Oni)? +TitleFrom: Dancemania( Oni)? TitleTo: Dancemania 鬼 * -TitleFrom: (TaQ( Oni)?)|(.*Road of TaQ) +TitleFrom: (TaQ( Oni)?)|(Road of TaQ) TitleTo: TaQ 道 * -TitleFrom: (Legend Road)|(Road of Legend)|(.*Legendary Road) +TitleFrom: (Legend Road)|(Road of Legend) TitleTo: 伝説道 * -TitleFrom: (.*Slow Demon Road)|(Road of Slow) +TitleFrom: (Slow Demon Road)|(Road of Slow) TitleTo: 鬼の遅道 * # "Road of True"? Maybe "Truth"? -TitleFrom: (.*True Demon Road)|(Road of Tru.*) +TitleFrom: (True Demon Road)|(Road of Tru.*) TitleTo: 真鬼道 * -# DWInsanity's Ayumi Platinum Course -TitleFrom: Ayumi( Platinum)? -TitleTo: あゆみ Platinum -* + diff --git a/stepmania/configure.ac b/stepmania/configure.ac index 292d3f4f78..80687a5d48 100644 --- a/stepmania/configure.ac +++ b/stepmania/configure.ac @@ -32,13 +32,12 @@ AC_SEARCH_LIBS(mad_synth_init, [mad], have_mad=yes, have_mad=no) AM_PATH_SDL AM_PATH_ALSA(0.9.0, alsa=true ,alsa=0 ) -AC_DEFINE_UNQUOTED([ALSA], $alsa) -AH_VERBATIM([ALSA], -[#if ALSA -#define HAVE_ALSA -#endif -]) +if test x$alsa = xtrue; then + AC_DEFINE(HAVE_ALSA, 1, [ALSA support available]) +fi +AC_CHECK_HEADER(linux/soundcard.h, [AC_DEFINE(HAVE_OSS, 1, [OSS support available])]) AM_CONDITIONAL(ALSA, test x$alsa = xtrue ) +AM_CONDITIONAL(HAVE_OSS, test x$ac_cv_header_linux_soundcard_h = xyes ) # We could do this more cleanly with an AC_CHECK_FUNCS wrapper. AC_CHECK_FUNCS([powf sqrtf sinf tanf cosf acosf roundf]) diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 2aed9102bd..ff75ef9a92 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -153,6 +153,9 @@ Sound = $(Sound_Null) if ALSA Sound += $(Sound_ALSA9) endif +if HAVE_OSS +Sound += $(Sound_OSS) +endif stepmania_SOURCES = $(Rage) $(DataStructures) $(FileTypes) $(StepMania) $(Transitions) \ $(Actors) $(ActorsInMenus) $(ActorsInGameplay) $(Screens) $(GlobalSingletons) \ diff --git a/stepmania/src/NotesLoaderDWI.cpp b/stepmania/src/NotesLoaderDWI.cpp index ae852f5574..433f507d31 100644 --- a/stepmania/src/NotesLoaderDWI.cpp +++ b/stepmania/src/NotesLoaderDWI.cpp @@ -73,8 +73,10 @@ bool DWILoader::LoadFromDWITokens( out.m_NotesType = NOTES_TYPE_INVALID; sStepData1.Replace( "\n", "" ); + sStepData1.Replace( "\r", "" ); sStepData1.Replace( " ", "" ); sStepData2.Replace( "\n", "" ); + sStepData2.Replace( "\r", "" ); sStepData2.Replace( " ", "" ); if( sMode == "SINGLE" ) out.m_NotesType = NOTES_TYPE_DANCE_SINGLE; diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp index 51dd7e1c13..3b860611f8 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -18,11 +18,10 @@ /* samples */ const int channels = 2; const int samplesize = channels*2; /* 16-bit */ -const int buffersize_frames = 1024*8; /* in frames */ -const int buffersize = buffersize_frames * samplesize; /* in bytes */ - -const int num_chunks = 8; - +const int chunk_order = 12; +const int num_chunks = 4; +const int buffersize = num_chunks * (1 << (chunk_order-1)); /* in bytes */ +const int buffersize_frames = buffersize/samplesize; /* in frames */ int RageSound_OSS::MixerThread_start(void *p) { @@ -194,11 +193,14 @@ RageSound_OSS::RageSound_OSS() if(i != channels) RageException::ThrowNonfatal("RageSound_OSS: Wanted %i channels, got %i instead", channels, i); - i = 48000; + i = 44100; if(ioctl(fd, SOUND_PCM_WRITE_RATE, &i) == -1 ) RageException::ThrowNonfatal("RageSound_OSS: ioctl(SOUND_PCM_WRITE_RATE, %i): %s", i, strerror(errno)); samplerate = i; LOG->Trace("RageSound_OSS: sample rate %i", samplerate); + i = (num_chunks << 16) + chunk_order; + if(ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &i) == -1) + RageException::ThrowNonfatal("RageSound_OSS: ioctl(SNDCTL_DSP_SETFRAGMENT, %i): %s", i, strerror(errno)); MixerThreadPtr = SDL_CreateThread(MixerThread_start, this); } diff --git a/stepmania/src/arch/arch_linux.h b/stepmania/src/arch/arch_linux.h index bc11f76065..1edabf92dc 100644 --- a/stepmania/src/arch/arch_linux.h +++ b/stepmania/src/arch/arch_linux.h @@ -4,6 +4,7 @@ /* #ifdef HAS_ALSA9 */ #include "Sound/RageSoundDriver_ALSA9.h" /* #endif HAS_ALSA9 */ +#include "Sound/RageSoundDriver_OSS.h" #endif