Merge commit '01361983136f137361280f21fc37dc25ab9a4407' into Code_cleanup

2bb84fc28af2c492b071f.

Conflicts:
	VocaluxeLib/Menu/IMenu.cs
This commit is contained in:
Flamefire committed 2013-04-14 13:02:39 +02:00
commit 7f26aa6051
57 files changed
+1760 -1416

No files matched your search

+8 -8
View File
@@ -184,11 +184,9 @@ void GstreamerAudioStream::RefreshDuration()
{
if(Element)
{
gint64 time;
if(!gst_element_query_duration(Element, GST_FORMAT_TIME, &time)) {
LogError("Could not query duration");
}
Duration = (gfloat)((gdouble)(time/GST_SECOND));
gint64 time = -1000;
if(gst_element_query_duration(Element, GST_FORMAT_TIME, &time))
Duration = (gfloat)((gdouble)(time/GST_SECOND));
}
}
@@ -196,9 +194,11 @@ float GstreamerAudioStream::GetPosition()
{
if(Element)
{
gint64 time;
gst_element_query_position(Element, GST_FORMAT_TIME, &time);
return (float)((gdouble)time/GST_SECOND);
gint64 time = 0;
if (gst_element_query_position(Element, GST_FORMAT_TIME, &time))
return (float)((gdouble)time/GST_SECOND);
else
return -1;
}
else return -1;
}
+1 -1
View File
@@ -19,7 +19,7 @@ DllExport bool InitVideo()
#if _WIN64
SetDllDirectory(L".\\x64\\gstreamer");
#else
SetDllDirectory(L".\\x86\gstreamer");
SetDllDirectory(L".\\x86\\gstreamer");
#endif
gst_init(NULL, NULL);
+199
View File
@@ -0,0 +1,199 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Nederlands</string>
<string name="TR_PROGRAM_NAME">Vocaluxe</string>
<string name="TR_GENERAL_AND">en</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_SAVE">Opslaan</string>
<string name="TR_BUTTON_BACK">Terug</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_DEBUG_AUDIO_STREAMS">Geluidstreams</string>
<string name="TR_DEBUG_VIDEO_STREAMS">Videostreams</string>
<string name="TR_DEBUG_TEXTURES">Structuren</string>
<string name="TR_DEBUG_TONE_ABS">ToneAbs</string>
<string name="TR_DEBUG_MAX_VOLUME">Maximaal Volume</string>
<string name="TR_DEBUG_SONGS">Liedjes geladen</string>
<string name="TR_DEBUG_MOUSE">Muis</string>
<string name="TR_GAMEMODE_NORMAL">Normaal</string>
<string name="TR_GAMEMODE_DUET">Duet</string>
<string name="TR_GAMEMODE_MEDLEY">Medley</string>
<string name="TR_GAMEMODE_SHORTSONG">Korte versie</string>
<string name="TR_RATING_VOCAL_HERO">Vocale Held</string>
<string name="TR_RATING_SUPERSTAR">Superster</string>
<string name="TR_RATING_LEAD_SINGER">Hoofdzanger</string>
<string name="TR_RATING_RISING_STAR">Ster in wording</string>
<string name="TR_RATING_HOPEFUL">Hoopvol</string>
<string name="TR_RATING_WANNABE">Wannabe</string>
<string name="TR_RATING_AMATEUR">Amateur</string>
<string name="TR_RATING_TONE_DEAF">Toondoof</string>
<string name="TR_CONFIG_SOFTWARE">Software</string>
<string name="TR_CONFIG_OPENGL">OpenGL</string>
<string name="TR_CONFIG_DIRECT3D">Direct3D</string>
<string name="TR_CONFIG_TEXTURE_LOWEST">Laagst</string>
<string name="TR_CONFIG_TEXTURE_LOW">Laag</string>
<string name="TR_CONFIG_TEXTURE_MEDIUM">Medium</string>
<string name="TR_CONFIG_TEXTURE_HIGH">Hoog</string>
<string name="TR_CONFIG_TEXTURE_HIGHEST">Hoogst</string>
<string name="TR_CONFIG_OFF">Uit</string>
<string name="TR_CONFIG_ON">Aan</string>
<string name="TR_CONFIG_ONLY_FPS">Alleen FPS</string>
<string name="TR_CONFIG_LEVEL1">Niveau 1</string>
<string name="TR_CONFIG_LEVEL2">Niveau 2</string>
<string name="TR_CONFIG_LEVEL3">Niveau 3</string>
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
<string name="TR_CONFIG_LIST">Lijst</string>
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
<string name="TR_CONFIG_TILE_BOARD">Tegels</string>
<string name="TR_CONFIG_BOOK">Boek</string>
<string name="TR_CONFIG_COVERLOADING_ONDEMAND">Op aanvraag</string>
<string name="TR_CONFIG_COVERLOADING_ATSTART">Bij het opstarten</string>
<string name="TR_CONFIG_COVERLOADING_DYNAMIC">Dynamisch</string>
<string name="TR_CONFIG_NONE">Geen</string>
<string name="TR_CONFIG_RANDOM">Willekeurig</string>
<string name="TR_CONFIG_FOLDER">Map</string>
<string name="TR_CONFIG_ARTIST">Artiest</string>
<string name="TR_CONFIG_ARTIST_LETTER">Artiestletter</string>
<string name="TR_CONFIG_TITLE_LETTER">Tegelletter</string>
<string name="TR_CONFIG_EDITION">Editie</string>
<string name="TR_CONFIG_GENRE">Genre</string>
<string name="TR_CONFIG_YEAR">Jaar</string>
<string name="TR_CONFIG_DECADE">Decennium</string>
<string name="TR_CONFIG_LANGUAGE">Taal</string>
<string name="TR_CONFIG_EASY">Eenvoudig</string>
<string name="TR_CONFIG_NORMAL">Normaal</string>
<string name="TR_CONFIG_HARD">Moeilijk</string>
<string name="TR_CONFIG_TIMERMODE_CURRENT">Huidig</string>
<string name="TR_CONFIG_TIMERMODE_REMAINING">Te gaan</string>
<string name="TR_CONFIG_TIMERMODE_TOTAL">Totaal</string>
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normaal</string>
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Uitgebreid</string>
<string name="TR_CONFIG_OWN_MUSIC">Eigen Muziek en Achtergrondmuziek</string>
<string name="TR_CONFIG_NO_OWN_MUSIC">Geen eigen Muziek</string>
<string name="TR_CONFIG_ONLY_OWN_MUSIC">Alleen eigen Muziek</string>
<string name="TR_CONFIG_FADEPLAYERINFO_ALL">Alles</string>
<string name="TR_CONFIG_FADEPLAYERINFO_INFO">Alleen namen en avatars</string>
<string name="TR_CONFIG_FADEPLAYERINFO_OFF">Niets</string>
<string name="TR_SCREENLOAD_LOADING">Laden</string>
<string name="TR_SCREENLOAD_TOTAL">Totaal</string>
<string name="TR_SCREENLOAD_SONGS">Liedjes</string>
<string name="TR_SCREENLOAD_LOADED">geladen</string>
<string name="TR_SCREENMAIN_MENU">Hoofdmenu</string>
<string name="TR_SCREENMAIN_BUTTON_SING">Zing</string>
<string name="TR_SCREENMAIN_BUTTON_PARTY">Party</string>
<string name="TR_SCREENMAIN_BUTTON_OPTIONS">Instellingen</string>
<string name="TR_SCREENMAIN_BUTTON_PROFILES">Profielen</string>
<string name="TR_SCREENPARTY_TITLE">Partymodus Selectie</string>
<string name="TR_SCREENPARTY_MODES">Partymodus</string>
<string name="TR_SCREENPARTY_DESCRIPTION">Omschrijving</string>
<string name="TR_SCREENPARTY_AUTHOR">Auteur</string>
<string name="TR_SCREENPARTY_VERSION">Versie</string>
<string name="TR_SCREENPARTY_ERROR">Kan deze Partymodus niet laden</string>
<string name="TR_SCREENPARTY_TARGETAUDIENCE">Doelgroep</string>
<string name="TR_SCREENPARTY_NOTEAMS">Geen teams</string>
<string name="TR_SCREENPARTY_NUMTEAMS">Aantal teams</string>
<string name="TR_SCREENPARTY_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENNAMES_MENU">Spelerselectie</string>
<string name="TR_SCREENNAMES_PLAYER">Speler</string>
<string name="TR_SCREENNAMES_1PLAYER">1 Speler</string>
<string name="TR_SCREENNAMES_2PLAYER">2 Spelers</string>
<string name="TR_SCREENNAMES_3PLAYER">3 Spelers</string>
<string name="TR_SCREENNAMES_4PLAYER">4 Spelers</string>
<string name="TR_SCREENNAMES_5PLAYER">5 Spelers</string>
<string name="TR_SCREENNAMES_6PLAYER">6 Spelers</string>
<string name="TR_SCREENNAMES_WARNING_MICS_SG">Waarschuwing: Er is geen microfoon toegewezen aan speler %v!</string>
<string name="TR_SCREENNAMES_WARNING_MICS_PL">Waarschuwing: Er zijn geen microfoons toegewezen aan spelers %v!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_SG">Waarschuwing: Er is geen profiel toegewezen aan speler %v!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_PL">Waarschuwing: Er zijn geen profielen toegewezen aan spelers %v!</string>
<string name="TR_SCREENSONG_MENU">Liedjesselectie</string>
<string name="TR_SCREENSONG_BUTTON_SING">Zing</string>
<string name="TR_SCREENSONG_BUTTON_PLAYLIST">Toevoegen aan afspeellijst</string>
<string name="TR_SCREENSONG_BUTTON_CANCEL">Sluiten</string>
<string name="TR_SCREENSONG_BUTTON_RANDOM">Kies een willekeurig liedje</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMCAT">Kies een willekeurige categorie</string>
<string name="TR_SCREENSONG_BUTTON_SINGALL">Zing alle liedjes</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Zing alle zichtbare liedjes</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Open afspeellijst</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Zing een willekeurige medley</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Zing medleyliedjes</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">Nieuwe afspeellijst</string>
<string name="TR_SCREENSONG_SONGOPTIONS">Liedjesopties</string>
<string name="TR_SCREENSONG_SEARCH">Zoek:</string>
<string name="TR_SCREENSONG_NOLANGUAGE">Geen taal</string>
<string name="TR_SCREENSONG_NOYEAR">Geen jaar</string>
<string name="TR_SCREENSONG_NOGENRE">Geen genre</string>
<string name="TR_SCREENSONG_NOEDITION">Geen editie</string>
<string name="TR_SCREENSONG_ALLSONGS">Alle liedjes</string>
<string name="TR_SCREENSONG_NUMSONGS">(%v Liedjes)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v Liedje)</string>
<string name="TR_SCREENSING_PAUSE">Pauze</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Stop met zingen</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Doorgaan</string>
<string name="TR_SCREENSING_BUTTON_SKIP">Sla dit liedje over</string>
<string name="TR_SCREENSCORE_SCORES">Scores</string>
<string name="TR_SCREENSCORE_RATING">Beoordeling</string>
<string name="TR_SCREENSCORE_POINTS">Punten</string>
<string name="TR_SCREENSCORE_GAMEDIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENSCORE_OVERALLSCORE">Totaalscore</string>
<string name="TR_SCREENHIGHSCORE_HIGHSCORE">Highscore</string>
<string name="TR_SCREENPROFILES_PROFILES">Profielen</string>
<string name="TR_SCREENPROFILES_PLAYERNAME">Spelernaam</string>
<string name="TR_SCREENPROFILES_GAMEDIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENPROFILES_AVATAR">Avatar</string>
<string name="TR_SCREENPROFILES_GUESTPROFILE">Gastprofiel</string>
<string name="TR_SCREENPROFILES_ACTIVE">Actief</string>
<string name="TR_SCREENPROFILES_BUTTON_NEW">Nieuw</string>
<string name="TR_SCREENPROFILES_BUTTON_DELETE">Verwijderen</string>
<string name="TR_SCREENPROFILES_BUTTON_TAKESNAPSHOT">Maak Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_SAVESNAPSHOT">Bewaar Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_DISCARDSNAPSHOT">Verwijder Screenshot</string>
<string name="TR_SCREENPROFILES_BUTTON_WEBCAM">Webcam</string>
<string name="TR_SCREENO_OPTIONS">Menu-opties</string>
<string name="TR_SCREENO_BUTTON_GAME">Spel</string>
<string name="TR_SCREENO_BUTTON_SOUND">Geluid</string>
<string name="TR_SCREENO_BUTTON_RECORD">Opname</string>
<string name="TR_SCREENO_BUTTON_VIDEO">Video</string>
<string name="TR_SCREENO_BUTTON_LYRICS">Songteksten</string>
<string name="TR_SCREENO_BUTTON_THEME">Thema</string>
<string name="TR_SCREENOGAME_OPTIONS">Spelinstellingen</string>
<string name="TR_SCREENOGAME_LANGUAGE">Taal</string>
<string name="TR_SCREENOGAME_DEBUGLEVEL">Debug Niveau</string>
<string name="TR_SCREENOGAME_SONGMENU">Liedjesmenu</string>
<string name="TR_SCREENOGAME_SONGSORTING">Sorteren Liedjes</string>
<string name="TR_SCREENOGAME_TABS">Tabs</string>
<string name="TR_SCREENOGAME_DIFFICULTY">Moeilijkheidsgraad</string>
<string name="TR_SCREENOGAME_TIMERMODE">Timermodus</string>
<string name="TR_SCREENORECORD_OPTIONS">Opname-opties</string>
<string name="TR_SCREENORECORD_DEVICE">Apparaat</string>
<string name="TR_SCREENORECORD_INPUT">Input</string>
<string name="TR_SCREENORECORD_CHANNEL_1">Kanaal 1</string>
<string name="TR_SCREENORECORD_CHANNEL_2">Kanaal 2</string>
<string name="TR_SCREENORECORD_MIC_DELAY">Microfoonvertraging</string>
<string name="TR_SCREENORECORD_MIC_WARNING">Waarschuwing: Ten minste één speler is toegewezen aan twee microfoons.</string>
<string name="TR_SCREENORECORD_BUTTON_DELAYTEST">Vertragingstest</string>
<string name="TR_SCREENOSOUND_OPTIONS">Geluidsopties</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSIC">Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME">Volume Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE">Bron Achtergrondmuziek</string>
<string name="TR_SCREENOSOUND_PREVIEWMUSICVOLUME">Preview Muziekvolume</string>
<string name="TR_SCREENOSOUND_GAMEMUSICVOLUME">Spel Muziekvolume</string>
<string name="TR_SCREENOTHEME_OPTIONS">Thema-opties</string>
<string name="TR_SCREENOTHEME_THEME">Thema</string>
<string name="TR_SCREENOTHEME_SKIN">Skin</string>
<string name="TR_SCREENOTHEME_COVERTHEME">Coverthema</string>
<string name="TR_SCREENOTHEME_NOTELINES">Toon Nootlijnen</string>
<string name="TR_SCREENOTHEME_TONEHELPER">Toon Toonhelper</string>
<string name="TR_SCREENOTHEME_TIMERLOOK">Uiterlijk Timer</string>
<string name="TR_SCREENOTHEME_FADEINFO">Fade Spelerinformatie</string>
<string name="TR_SCREENOTHEME_COVERLOADING">Gedrag Laden Covers</string>
<string name="TR_SCREENOLYRICS_OPTIONS">Songtekstopties</string>
<string name="TR_SCREENOLYRICS_STYLE">Stijl</string>
<string name="TR_SCREENOLYRICS_ONTOP">Songteksten bovenaan</string>
<string name="TR_SCREENOVIDEO_OPTIONS">Video-opties</string>
<string name="TR_SCREENOVIDEO_VIDEOBACKGROUNDS">Videoachtergronden</string>
<string name="TR_SCREENOVIDEO_VIDEOPREVIEW">Videopreview</string>
<string name="TR_SCREENOVIDEO_VIDEOINSONGS">Video tijdens zingen</string>
<string name="TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND">Toon huidige achtergrondmuziekvideo</string>
<string name="TR_SCREENO_VIDEO_WEBCAMDEVICES">Webcams</string>
<string name="TR_SCREENO_VIDEO_WEBCAMCAPABILITIES">Webcaminstellingen</string>
<string name="TR_SCREENPVOLUMECONTROL_VOLUME">Volume</string>
</resources>
+199
View File
@@ -0,0 +1,199 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PROGRAM_NAME">Vocaluxe</string>
<string name="TR_GENERAL_AND">ve</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_SAVE">Kaydet</string>
<string name="TR_BUTTON_BACK">Geri</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_DEBUG_AUDIO_STREAMS">Ses akışları</string>
<string name="TR_DEBUG_VIDEO_STREAMS">Video akışları</string>
<string name="TR_DEBUG_TEXTURES">Desenler</string>
<string name="TR_DEBUG_TONE_ABS">ABS Tonu</string>
<string name="TR_DEBUG_MAX_VOLUME">Max Ses</string>
<string name="TR_DEBUG_SONGS">Yüklenen şarkılar</string>
<string name="TR_DEBUG_MOUSE">Fare</string>
<string name="TR_GAMEMODE_NORMAL">Normal</string>
<string name="TR_GAMEMODE_DUET">Düet</string>
<string name="TR_GAMEMODE_MEDLEY">Potpuri</string>
<string name="TR_GAMEMODE_SHORTSONG">Kısa versiyon</string>
<string name="TR_RATING_VOCAL_HERO">Sözlü Kahraman</string>
<string name="TR_RATING_SUPERSTAR">Süperstar</string>
<string name="TR_RATING_LEAD_SINGER">Solist</string>
<string name="TR_RATING_RISING_STAR">Yükselen Yıldız</string>
<string name="TR_RATING_HOPEFUL">Ümit Vaadeden</string>
<string name="TR_RATING_WANNABE">Taklitçi</string>
<string name="TR_RATING_AMATEUR">Amatör</string>
<string name="TR_RATING_TONE_DEAF">Müzik Kulağı Olmayan</string>
<string name="TR_CONFIG_SOFTWARE">Yazılım</string>
<string name="TR_CONFIG_OPENGL">OpenGL</string>
<string name="TR_CONFIG_DIRECT3D">Direct3D</string>
<string name="TR_CONFIG_TEXTURE_LOWEST">En düşük</string>
<string name="TR_CONFIG_TEXTURE_LOW">Düşük</string>
<string name="TR_CONFIG_TEXTURE_MEDIUM">Orta</string>
<string name="TR_CONFIG_TEXTURE_HIGH">Yüksek</string>
<string name="TR_CONFIG_TEXTURE_HIGHEST">En Yüksek</string>
<string name="TR_CONFIG_OFF">Kapalı</string>
<string name="TR_CONFIG_ON">Açık</string>
<string name="TR_CONFIG_ONLY_FPS">Sadece FPS</string>
<string name="TR_CONFIG_LEVEL1">Seviye 1</string>
<string name="TR_CONFIG_LEVEL2">Seviye 2</string>
<string name="TR_CONFIG_LEVEL3">Seviye 3</string>
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
<string name="TR_CONFIG_LIST">Liste</string>
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
<string name="TR_CONFIG_TILE_BOARD">Döşemeli Pano</string>
<string name="TR_CONFIG_BOOK">Kitap</string>
<string name="TR_CONFIG_COVERLOADING_ONDEMAND">İstek Üzerine</string>
<string name="TR_CONFIG_COVERLOADING_ATSTART">Başlangıçta</string>
<string name="TR_CONFIG_COVERLOADING_DYNAMIC">Dinamik</string>
<string name="TR_CONFIG_NONE">Yok</string>
<string name="TR_CONFIG_RANDOM">Rasgele</string>
<string name="TR_CONFIG_FOLDER">Klasör</string>
<string name="TR_CONFIG_ARTIST">Sanatçı</string>
<string name="TR_CONFIG_ARTIST_LETTER">Sanatçı Harfi</string>
<string name="TR_CONFIG_TITLE_LETTER">Başlık Harfi</string>
<string name="TR_CONFIG_EDITION">Basım</string>
<string name="TR_CONFIG_GENRE">Tür</string>
<string name="TR_CONFIG_YEAR">Yıl</string>
<string name="TR_CONFIG_DECADE">On yıl</string>
<string name="TR_CONFIG_LANGUAGE">Dil</string>
<string name="TR_CONFIG_EASY">Kolay</string>
<string name="TR_CONFIG_NORMAL">Normal</string>
<string name="TR_CONFIG_HARD">Zor</string>
<string name="TR_CONFIG_TIMERMODE_CURRENT">Şimdiki</string>
<string name="TR_CONFIG_TIMERMODE_REMAINING">Kalan</string>
<string name="TR_CONFIG_TIMERMODE_TOTAL">Toplam</string>
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normal</string>
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Genişletilmiş</string>
<string name="TR_CONFIG_OWN_MUSIC">Kendi Müziğiniz ve Arkaplan Müziği</string>
<string name="TR_CONFIG_NO_OWN_MUSIC">Hiç kendi müziğiniz yok</string>
<string name="TR_CONFIG_ONLY_OWN_MUSIC">Sadece kendi Müziğim</string>
<string name="TR_CONFIG_FADEPLAYERINFO_ALL">Hepsi</string>
<string name="TR_CONFIG_FADEPLAYERINFO_INFO">Sadece isimler ve fotoğrafları</string>
<string name="TR_CONFIG_FADEPLAYERINFO_OFF">Hiçbirşey</string>
<string name="TR_SCREENLOAD_LOADING">Yükleniyor</string>
<string name="TR_SCREENLOAD_TOTAL">Toplam</string>
<string name="TR_SCREENLOAD_SONGS">Şarkılar</string>
<string name="TR_SCREENLOAD_LOADED">yüklendi</string>
<string name="TR_SCREENMAIN_MENU">Ana Menü</string>
<string name="TR_SCREENMAIN_BUTTON_SING">Şarkı</string>
<string name="TR_SCREENMAIN_BUTTON_PARTY">Parti</string>
<string name="TR_SCREENMAIN_BUTTON_OPTIONS">Seçenekler</string>
<string name="TR_SCREENMAIN_BUTTON_PROFILES">Profiller</string>
<string name="TR_SCREENPARTY_TITLE">Parti Modu Seçeneği</string>
<string name="TR_SCREENPARTY_MODES">Parti Modu</string>
<string name="TR_SCREENPARTY_DESCRIPTION">Açıklama</string>
<string name="TR_SCREENPARTY_AUTHOR">Yazar</string>
<string name="TR_SCREENPARTY_VERSION">Sürüm</string>
<string name="TR_SCREENPARTY_ERROR">Bu parti modu yüklenemedi</string>
<string name="TR_SCREENPARTY_TARGETAUDIENCE">Hedef dinleyici</string>
<string name="TR_SCREENPARTY_NOTEAMS">Takım yok</string>
<string name="TR_SCREENPARTY_NUMTEAMS">Takım sayısı</string>
<string name="TR_SCREENPARTY_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENNAMES_MENU">Oyuncu Seçimi</string>
<string name="TR_SCREENNAMES_PLAYER">Oyuncu</string>
<string name="TR_SCREENNAMES_1PLAYER">1 Oyuncu</string>
<string name="TR_SCREENNAMES_2PLAYER">2 Oyunculu</string>
<string name="TR_SCREENNAMES_3PLAYER">3 Oyunculu</string>
<string name="TR_SCREENNAMES_4PLAYER">4 Oyunculu</string>
<string name="TR_SCREENNAMES_5PLAYER">5 Oyunculu</string>
<string name="TR_SCREENNAMES_6PLAYER">6 Oyunculu</string>
<string name="TR_SCREENNAMES_WARNING_MICS_SG">Uyarı: %v oyuncusu için hiç mikrofon atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_MICS_PL">Uyarı: %v oyuncuları için hiç mikrofon atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_SG">Uyarı: %v oyuncusu için hiç profil atanmadı!</string>
<string name="TR_SCREENNAMES_WARNING_PROFILES_PL">Uyarı: %v oyuncuları için hiç profil atanmadı!</string>
<string name="TR_SCREENSONG_MENU">Şarkı Seçimi</string>
<string name="TR_SCREENSONG_BUTTON_SING">Şarkı Söyle</string>
<string name="TR_SCREENSONG_BUTTON_PLAYLIST">Çalma Listesine Ekle</string>
<string name="TR_SCREENSONG_BUTTON_CANCEL">Kapat</string>
<string name="TR_SCREENSONG_BUTTON_RANDOM">Rastgele bir şarkı seç</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMCAT">Rastgele bir kategori seç</string>
<string name="TR_SCREENSONG_BUTTON_SINGALL">Tüm şarkıları söyle</string>
<string name="TR_SCREENSONG_BUTTON_SINGALLVISIBLE">Tüm görünür şarkıları söyle</string>
<string name="TR_SCREENSONG_BUTTON_OPENPLAYLIST">Çalma listesini aç</string>
<string name="TR_SCREENSONG_BUTTON_RANDOMMEDLEY">Rastgele bir potpuri söyle</string>
<string name="TR_SCREENSONG_BUTTON_STARTMEDLEY">Potpuri şarkılarını söyle</string>
<string name="TR_SCREENSONG_NEWPLAYLIST">Yeni Çalma Listesi</string>
<string name="TR_SCREENSONG_SONGOPTIONS">Şarkı Seçenekleri</string>
<string name="TR_SCREENSONG_SEARCH">Arama:</string>
<string name="TR_SCREENSONG_NOLANGUAGE">Dil yok</string>
<string name="TR_SCREENSONG_NOYEAR">Yıl yok</string>
<string name="TR_SCREENSONG_NOGENRE">Tür yok</string>
<string name="TR_SCREENSONG_NOEDITION">Basım yok</string>
<string name="TR_SCREENSONG_ALLSONGS">Tüm Şarkılar</string>
<string name="TR_SCREENSONG_NUMSONGS">(%v Şarkıları)</string>
<string name="TR_SCREENSONG_NUMSONG">(%v Şarkısı)</string>
<string name="TR_SCREENSING_PAUSE">Duraklat</string>
<string name="TR_SCREENSING_BUTTON_CANCEL">Şarkı söylemeyi durdur</string>
<string name="TR_SCREENSING_BUTTON_CONTINUE">Devam et</string>
<string name="TR_SCREENSING_BUTTON_SKIP">Bu şarkıyı atla</string>
<string name="TR_SCREENSCORE_SCORES">Skorlar</string>
<string name="TR_SCREENSCORE_RATING">Derecelendirme</string>
<string name="TR_SCREENSCORE_POINTS">Puanlar</string>
<string name="TR_SCREENSCORE_GAMEDIFFICULTY">Zorluk Derecesi</string>
<string name="TR_SCREENSCORE_OVERALLSCORE">Genel skor</string>
<string name="TR_SCREENHIGHSCORE_HIGHSCORE">Yüksek skor</string>
<string name="TR_SCREENPROFILES_PROFILES">Profiller</string>
<string name="TR_SCREENPROFILES_PLAYERNAME">Oyuncu Adı</string>
<string name="TR_SCREENPROFILES_GAMEDIFFICULTY">Oyun Zorluğu</string>
<string name="TR_SCREENPROFILES_AVATAR">Profil Resmi</string>
<string name="TR_SCREENPROFILES_GUESTPROFILE">Misafir Profili</string>
<string name="TR_SCREENPROFILES_ACTIVE">Aktif</string>
<string name="TR_SCREENPROFILES_BUTTON_NEW">Yeni</string>
<string name="TR_SCREENPROFILES_BUTTON_DELETE">Sil</string>
<string name="TR_SCREENPROFILES_BUTTON_TAKESNAPSHOT">Ekran Görüntüsü Al</string>
<string name="TR_SCREENPROFILES_BUTTON_SAVESNAPSHOT">Ekran Görüntüsünü Kaydet</string>
<string name="TR_SCREENPROFILES_BUTTON_DISCARDSNAPSHOT">Ekran Görüntüsünü Sil</string>
<string name="TR_SCREENPROFILES_BUTTON_WEBCAM">Webcam</string>
<string name="TR_SCREENO_OPTIONS">Menü Seçenekleri</string>
<string name="TR_SCREENO_BUTTON_GAME">Oyun</string>
<string name="TR_SCREENO_BUTTON_SOUND">Ses</string>
<string name="TR_SCREENO_BUTTON_RECORD">Kayıt</string>
<string name="TR_SCREENO_BUTTON_VIDEO">Video</string>
<string name="TR_SCREENO_BUTTON_LYRICS">Sözler</string>
<string name="TR_SCREENO_BUTTON_THEME">Tema</string>
<string name="TR_SCREENOGAME_OPTIONS">Oyun Seçenekleri</string>
<string name="TR_SCREENOGAME_LANGUAGE">Dil</string>
<string name="TR_SCREENOGAME_DEBUGLEVEL">Hata Ayıklama Seviyesi</string>
<string name="TR_SCREENOGAME_SONGMENU">Şarkı Menüsü</string>
<string name="TR_SCREENOGAME_SONGSORTING">Şarkı Sıralama</string>
<string name="TR_SCREENOGAME_TABS">Sekmeler</string>
<string name="TR_SCREENOGAME_DIFFICULTY">Oyun Zorluğu</string>
<string name="TR_SCREENOGAME_TIMERMODE">Zamanlayıcı Modu</string>
<string name="TR_SCREENORECORD_OPTIONS">Kaydetme Seçenekleri</string>
<string name="TR_SCREENORECORD_DEVICE">Aygıt</string>
<string name="TR_SCREENORECORD_INPUT">Giriş</string>
<string name="TR_SCREENORECORD_CHANNEL_1">Kanal 1</string>
<string name="TR_SCREENORECORD_CHANNEL_2">Kanal 2 </string>
<string name="TR_SCREENORECORD_MIC_DELAY">Mikrofon Gecikmesi</string>
<string name="TR_SCREENORECORD_MIC_WARNING">Uyarı: Tek oyuncuya iki mikrofon atandı.</string>
<string name="TR_SCREENORECORD_BUTTON_DELAYTEST">Gecikme Testi</string>
<string name="TR_SCREENOSOUND_OPTIONS">Ses Seçenekleri</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSIC">Arka Plan Müziği</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME">Arka Plan Müziği Seviyesi</string>
<string name="TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE">Arka Plan Müziği Kaynağı</string>
<string name="TR_SCREENOSOUND_PREVIEWMUSICVOLUME">Ön İzleme Müziği Seviyesi</string>
<string name="TR_SCREENOSOUND_GAMEMUSICVOLUME">Oyun Müziği Seviyesi</string>
<string name="TR_SCREENOTHEME_OPTIONS">Tema Seçenekleri</string>
<string name="TR_SCREENOTHEME_THEME">Tema</string>
<string name="TR_SCREENOTHEME_SKIN">Renk</string>
<string name="TR_SCREENOTHEME_COVERTHEME">Kapak Teması</string>
<string name="TR_SCREENOTHEME_NOTELINES">Not Çizgilerini Göster</string>
<string name="TR_SCREENOTHEME_TONEHELPER">Ton Yardımcısını Göster</string>
<string name="TR_SCREENOTHEME_TIMERLOOK">Kronometre Bakışı</string>
<string name="TR_SCREENOTHEME_FADEINFO">Oyuncu Bilgisini Kapat</string>
<string name="TR_SCREENOTHEME_COVERLOADING">Kapak Yüklenme Davranışı</string>
<string name="TR_SCREENOLYRICS_OPTIONS">Şarkı Sözü Seçenekleri</string>
<string name="TR_SCREENOLYRICS_STYLE">Tarz</string>
<string name="TR_SCREENOLYRICS_ONTOP">Sözler Yukarıda Gösterilsin</string>
<string name="TR_SCREENOVIDEO_OPTIONS">Video Seçenekleri</string>
<string name="TR_SCREENOVIDEO_VIDEOBACKGROUNDS">Video Arka Planları</string>
<string name="TR_SCREENOVIDEO_VIDEOPREVIEW">Video Önizleme</string>
<string name="TR_SCREENOVIDEO_VIDEOINSONGS">Şarkı Söylerken Videoları Gösterme</string>
<string name="TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND">Mevcut Arka Plan Müziği Videosunu Göster</string>
<string name="TR_SCREENO_VIDEO_WEBCAMDEVICES">Web Kameraları</string>
<string name="TR_SCREENO_VIDEO_WEBCAMCAPABILITIES">Web Kameraları Özellikleri</string>
<string name="TR_SCREENPVOLUMECONTROL_VOLUME">Ses</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Uitdaging</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Uitdaging.</string>
<string name="TR_PARTYMODE_AUDIENCE">Voor iedereen geïnteresseerd in duelleren.</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Volgende Ronde</string>
<string name="TR_SCREENCONFIG_TITLE">Uitdaging: Configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENCONFIG_NUMMICS">Aantal microfoons</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Aantal rondes</string>
<string name="TR_SCREENNAMES_TITLE">Uitdaging: Kies speler</string>
<string name="TR_SCREENMAIN_TITLE">Uitdaging: Overzicht</string>
<string name="TR_SCREENMAIN_TABLE_POS">#</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">Naam</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Rondes</string>
<string name="TR_SCREENMAIN_TABLE_WON">Overwinningen</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Zingpunten</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Score</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Wil je echt afsluiten?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Speler van volgende ronde:</string>
<string name="TR_SCREENMAIN_FINISH">Alle rondes zijn gezongen! De winnaar is...</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">Yarışma Modu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Biraz yarışma turu oyna.</string>
<string name="TR_PARTYMODE_AUDIENCE">Düello yarışmalarıyla ilgilenen herkes için.</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Sonraki Tur</string>
<string name="TR_SCREENCONFIG_TITLE">Yarışma Modu: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMMICS">Mikrofon sayısı</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Tur sayısı</string>
<string name="TR_SCREENNAMES_TITLE">Yarışma Modu: Oyuncu Seçiniz</string>
<string name="TR_SCREENMAIN_TITLE">Yarışma Modu: Genel Bakış</string>
<string name="TR_SCREENMAIN_TABLE_POS">Pozisyon</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">İsim</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Turlar</string>
<string name="TR_SCREENMAIN_TABLE_WON">Kazanma</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Şarkı Söyleme Puanı</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Skor</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki turun oyuncusu:</string>
<string name="TR_SCREENMAIN_FINISH">Tüm turlar tamamlandı! Kazanan...</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Uitdaging Medley</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Uitdaging met alleen 5 Medleys</string>
<string name="TR_PARTYMODE_AUDIENCE">Voor iedereen geïnteresseerd in duelleren en Medleys.</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Volgende Ronde</string>
<string name="TR_SCREENCONFIG_TITLE">Uitdaging Medley: Configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Aantal spelers</string>
<string name="TR_SCREENCONFIG_NUMMICS">Aantal microfoons</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Aantal rondes</string>
<string name="TR_SCREENNAMES_TITLE">Uitdaging Medley: Kies speler</string>
<string name="TR_SCREENMAIN_TITLE">Uitdaging Medley: Overzicht</string>
<string name="TR_SCREENMAIN_TABLE_POS">#</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">Naam</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Rondes</string>
<string name="TR_SCREENMAIN_TABLE_WON">Overwinningen</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Zingpunten</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Score</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Wil je echt afsluiten?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Speler van volgende ronde:</string>
<string name="TR_SCREENMAIN_FINISH">Alle rondes zijn gezonden! De winnaar is...</string>
</resources>
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">Potpuri Yarış Modu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Sadece 5 Potpuri kullanarak yarışma turları oyna.</string>
<string name="TR_PARTYMODE_AUDIENCE">Düel yarışmaları ve Potpuri ile ilgilenen herkes için.</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çık</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Sonraki Tur</string>
<string name="TR_SCREENCONFIG_TITLE">Potpuri Yarış Modu: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERS">Oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMMICS">Mikrofon sayısı</string>
<string name="TR_SCREENCONFIG_NUMROUNDS">Tur sayısı</string>
<string name="TR_SCREENNAMES_TITLE">Potpuri Yarışma Modu: Oyuncu Seçimi</string>
<string name="TR_SCREENMAIN_TITLE">Potpuri Yarışma Modu: Genel Bakış</string>
<string name="TR_SCREENMAIN_TABLE_POS">Pos</string>
<string name="TR_SCREENMAIN_TABLE_PLAYERNAME">İsim</string>
<string name="TR_SCREENMAIN_TABLE_NUMPLAYED">Tur</string>
<string name="TR_SCREENMAIN_TABLE_WON">Kazanma</string>
<string name="TR_SCREENMAIN_TABLE_SINGPOINTS">Şarkı Söyleme Puanı</string>
<string name="TR_SCREENMAIN_TABLE_GAMEPOINTS">Skor</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki tur oyuncusu:</string>
<string name="TR_SCREENMAIN_FINISH">Tüm turlar tamamlandı! Kazanan...</string>
</resources>
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Engels</string>
<string name="TR_PARTYMODE_NAME">Drie-op-een-rij</string>
<string name="TR_PARTYMODE_DESCRIPTION">Speel Drie-op-een-rij op een speciale manier</string>
<string name="TR_PARTYMODE_AUDIENCE">Grappige rondes met strategie, geluk en kunde</string>
<string name="TR_BUTTON_NEXT">Volgende</string>
<string name="TR_BUTTON_BACK">Vorige</string>
<string name="TR_BUTTON_START">Start</string>
<string name="TR_BUTTON_EXIT">Afsluiten</string>
<string name="TR_BUTTON_YES">Ja</string>
<string name="TR_BUTTON_NO">Nee</string>
<string name="TR_BUTTON_NEXT_ROUND">Start</string>
<string name="TR_SONGS">Liedjes</string>
<string name="TR_TEAM">Team</string>
<string name="TR_PLAYLIST">Afspeellijst</string>
<string name="TR_CATEGORY">Categorie</string>
<string name="TR_ALLSONGS">Alle liedjes</string>
<string name="TR_SCREENCONFIG_TITLE">Drie-op-een-rij: configuratie</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST1">Aantal spelers in team 1</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST2">Aantal spelers in team 2</string>
<string name="TR_SCREENCONFIG_NUMFIELDS">Aantal vakjes</string>
<string name="TR_SCREENCONFIG_SONGSOURCE">Liedjesbron</string>
<string name="TR_SCREENCONFIG_GAMEMODE">Spelmodus</string>
<string name="TR_SCREENNAMES_TITLE">Drie-op-een-rij: Kies speler</string>
<string name="TR_SCREENNAMES_TEAM1">Team 1</string>
<string name="TR_SCREENNAMES_TEAM2">Team 2</string>
<string name="TR_SCREENMAIN_TITLE">Drie-op-een-rij</string>
<string name="TR_SCREENMAIN_TEAM_CHOOSE">Kies een vakje.</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Volgende speler</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">Drie-op-een-rij afsluiten?</string>
<string name="TR_SCREENMAIN_WINNER">En de winnaar is...</string>
<string name="TR_SCREENMAIN_NOWINNER">Er is geen winnaar in deze ronde...</string>
</resources>
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="language">Türkçe</string>
<string name="TR_PARTYMODE_NAME">XOX oyunu</string>
<string name="TR_PARTYMODE_DESCRIPTION">Özel bir şekilde XOX oyna</string>
<string name="TR_PARTYMODE_AUDIENCE">Strateji, şans ve becerilerle eğlenceli turlar</string>
<string name="TR_BUTTON_NEXT">Sonraki</string>
<string name="TR_BUTTON_BACK">Önceki</string>
<string name="TR_BUTTON_START">Başla</string>
<string name="TR_BUTTON_EXIT">Çıkış</string>
<string name="TR_BUTTON_YES">Evet</string>
<string name="TR_BUTTON_NO">Hayır</string>
<string name="TR_BUTTON_NEXT_ROUND">Başla</string>
<string name="TR_SONGS">Şarkılar</string>
<string name="TR_TEAM">Takım</string>
<string name="TR_PLAYLIST">Çalma Listesi</string>
<string name="TR_CATEGORY">Kategori</string>
<string name="TR_ALLSONGS">Tüm Şarkılar</string>
<string name="TR_SCREENCONFIG_TITLE">XOX: Yapılandırma</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST1">1. takımdaki oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMPLAYERST2">2. takımdaki oyuncu sayısı</string>
<string name="TR_SCREENCONFIG_NUMFIELDS">Bölge sayısı</string>
<string name="TR_SCREENCONFIG_SONGSOURCE">Şarkı Kaynağı</string>
<string name="TR_SCREENCONFIG_GAMEMODE">Oyun Modu</string>
<string name="TR_SCREENNAMES_TITLE">XOX: Oyuncu Seç</string>
<string name="TR_SCREENNAMES_TEAM1">1. Takım</string>
<string name="TR_SCREENNAMES_TEAM2">2. Takım</string>
<string name="TR_SCREENMAIN_TITLE">XOX</string>
<string name="TR_SCREENMAIN_TEAM_CHOOSE">Bir bölge seç.</string>
<string name="TR_SCREENMAIN_NEXT_PLAYER">Sonraki oyuncu</string>
<string name="TR_SCREENMAIN_POPUP_REALLYEXIT">XOX oyunundan gerçekten çıkmak istiyor musunuz?</string>
<string name="TR_SCREENMAIN_WINNER">Ve kazanan...</string>
<string name="TR_SCREENMAIN_NOWINNER">Bu turdan hiç kazanan çıkmadı...</string>
</resources>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,9 +10,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.Challenge</RootNamespace>
<AssemblyName>Challenge</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
@@ -10,9 +10,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.ChallengeMedley</RootNamespace>
<AssemblyName>ChallengeMedley</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
@@ -10,9 +10,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.TicTacToe</RootNamespace>
<AssemblyName>TicTacToe</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
+6 -3
View File
@@ -1,10 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio Express 2012 for Windows Desktop
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
ProjectSection(ProjectDependencies) = postProject
{6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678}
{6F3E1874-F28A-40E9-AFBD-31934D593679} = {6F3E1874-F28A-40E9-AFBD-31934D593679}
{ED007796-367F-4142-AA55-5450C7645C2C} = {ED007796-367F-4142-AA55-5450C7645C2C}
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC} = {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}
{5A4053F1-5AD5-441F-B254-D97A088127B6} = {5A4053F1-5AD5-441F-B254-D97A088127B6}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VocaluxeLib", "VocaluxeLib\VocaluxeLib.csproj", "{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}"
@@ -110,13 +113,13 @@ Global
{6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{6F3E1874-F28A-40E9-AFBD-31934D593678}.ReleaseWin|x86.Build.0 = ReleaseWin|x86
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x64.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x86.ActiveCfg = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugLinux|x86.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x64.ActiveCfg = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x64.Build.0 = DebugWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.ActiveCfg = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.DebugWin|x86.Build.0 = DebugWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x64.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x86.ActiveCfg = ReleaseWin|Win32
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseLinux|x86.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x64.Build.0 = ReleaseWin|x64
{ED007796-367F-4142-AA55-5450C7645C2C}.ReleaseWin|x86.ActiveCfg = ReleaseWin|Win32
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Vocaluxe.Base
public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED;
public static EPlayerInfo PlayerInfo = EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH;
public static EFadePlayerInfo FadePlayerInfo = EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF;
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART;
public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC;
public static ELyricStyle LyricStyle = ELyricStyle.Slide;
// Sound
+1 -1
View File
@@ -311,7 +311,7 @@ namespace Vocaluxe.Base
CInput.Update();
if (CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC && _CurrentScreen != EScreens.ScreenSing)
CSongs.LoadCover(30, 1);
CSongs.LoadCover();
if (CSettings.GameState != EGameState.EditTheme)
{
+1 -1
View File
@@ -39,7 +39,7 @@ namespace Vocaluxe.Base
public const int iVersionSub = 0; // patches
public const ERevision VersionRevision = ERevision.Alpha;
public const int iBuild = 76; // Increase on every published version! Never Reset!
public const int iBuild = 77; // Increase on every published version! Never Reset!
public const int iDatabaseHighscoreVersion = 2;
public const int iDatabaseCoverVersion = 1;
+16 -10
View File
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using VocaluxeLib.Menu;
using VocaluxeLib.Menu.SongMenu;
@@ -42,6 +44,8 @@ namespace Vocaluxe.Base
public static CSongSorter Sorter = new CSongSorter();
public static CSongCategorizer Categorizer = new CSongCategorizer();
private static Thread _CoverLoaderThread = null;
public static List<CSong> Songs
{
get { return _Songs; }
@@ -391,9 +395,7 @@ namespace Vocaluxe.Base
{
Song.ID = _Songs.Count;
_Songs.Add(Song);
//Workaround to load notes if they are not loaded with the covers as there is no seperate progress indicator
if (CConfig.CoverLoading != ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART)
Song.ReadNotes();
Song.ReadNotes();
}
}
CLog.StopBenchmark(2, "Read TXTs");
@@ -410,14 +412,14 @@ namespace Vocaluxe.Base
if (CConfig.CoverLoading == ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART)
{
CLog.StartBenchmark(2, "Load Covers/Notes");
_LoadCoverAndNotes();
_LoadCover();
CLog.StopBenchmark(2, "Load Covers/Notes");
}
CLog.StopBenchmark(1, "Load Songs ");
GC.Collect();
}
public static void LoadCover(int WaitTime, int NumLoads)
public static void LoadCover()
{
if (CConfig.Renderer == ERenderer.TR_CONFIG_SOFTWARE)
return; //should be removed as soon as the other renderer are ready for queque
@@ -425,12 +427,16 @@ namespace Vocaluxe.Base
if (!SongsLoaded || CoverLoaded)
return;
if (!_CoverLoadTimer.IsRunning)
if (_CoverLoaderThread == null)
{
_CoverLoadTimer.Reset();
_CoverLoadTimer.Start();
_CoverLoaderThread = new Thread(new ThreadStart(_LoadCover));
_CoverLoaderThread.Name = "CoverLoader";
_CoverLoaderThread.Priority = ThreadPriority.BelowNormal;
_CoverLoaderThread.IsBackground = true;
_CoverLoaderThread.Start();
}
/*
if (_CoverLoadTimer.ElapsedMilliseconds >= WaitTime)
{
for (int i = 0; i < NumLoads; i++)
@@ -449,13 +455,13 @@ namespace Vocaluxe.Base
_CoverLoadTimer.Reset();
_CoverLoadTimer.Start();
}
* */
}
private static void _LoadCoverAndNotes()
private static void _LoadCover()
{
foreach (CSong song in _Songs)
{
song.ReadNotes();
song.LoadSmallCover();
_CoverLoadIndex++;
}
@@ -8,10 +8,6 @@ namespace Vocaluxe.Lib.Sound.Decoder
{
class CAudioDecoderFFmpeg : CAudioDecoder, IDisposable
{
private TAc_read_callback _rc;
private TAc_seek_callback _sc;
private FileStream _fs;
private IntPtr _instance = IntPtr.Zero;
private IntPtr _audiodecoder = IntPtr.Zero;
@@ -24,11 +20,7 @@ namespace Vocaluxe.Lib.Sound.Decoder
public override void Init()
{
_rc = read_proc;
_sc = seek_proc;
_FileOpened = false;
_Initialized = true;
}
@@ -38,12 +30,19 @@ namespace Vocaluxe.Lib.Sound.Decoder
return;
_FileName = FileName;
_fs = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
_instance = CAcinerella.ac_init();
CAcinerella.ac_open(_instance, IntPtr.Zero, null, _rc, _sc, null, IntPtr.Zero);
_Instance = (TAc_instance)Marshal.PtrToStructure(_instance, typeof(TAc_instance));
try
{
_instance = CAcinerella.ac_init();
CAcinerella.ac_open2(_instance, _FileName);
_Instance = (TAc_instance)Marshal.PtrToStructure(_instance, typeof(TAc_instance));
}
catch (Exception)
{
CLog.LogError("Error opening audio file: " + _FileName);
return;
}
if (!_Instance.opened)
{
@@ -52,26 +51,17 @@ namespace Vocaluxe.Lib.Sound.Decoder
}
int AudioStreamIndex = -1;
TAc_stream_info Info = new TAc_stream_info();
for (int i = 0; i < _Instance.stream_count; i++)
TAc_decoder Audiodecoder;
try
{
CAcinerella.ac_get_stream_info(_instance, i, out Info);
if (Info.stream_type == TAc_stream_type.AC_STREAM_TYPE_AUDIO)
{
try
{
_audiodecoder = CAcinerella.ac_create_decoder(_instance, i);
}
catch (Exception)
{
return;
}
AudioStreamIndex = i;
break;
}
_audiodecoder = CAcinerella.ac_create_audio_decoder(_instance);
Audiodecoder = (TAc_decoder)Marshal.PtrToStructure(_audiodecoder, typeof(TAc_decoder));
AudioStreamIndex = Audiodecoder.stream_index;
}
catch (Exception)
{
CLog.LogError("Error opening audio file (can't find decoder): " + _FileName);
return;
}
if (AudioStreamIndex < 0)
@@ -80,8 +70,6 @@ namespace Vocaluxe.Lib.Sound.Decoder
return;
}
TAc_decoder Audiodecoder = (TAc_decoder)Marshal.PtrToStructure(_audiodecoder, typeof(TAc_decoder));
_FormatInfo = new FormatInfo();
_FormatInfo.SamplesPerSecond = Audiodecoder.stream_info.audio_info.samples_per_second;
@@ -198,28 +186,8 @@ namespace Vocaluxe.Lib.Sound.Decoder
TimeStamp = 0f;
}
#region Callbacks
private Int32 read_proc(IntPtr sender, IntPtr buf, Int32 size)
{
Int32 r = 0;
byte[] bb = new byte[size];
r = _fs.Read(bb, 0, size);
Marshal.Copy(bb, 0, buf, size);
return r;
}
private Int64 seek_proc(IntPtr sender, Int64 pos, Int32 whence)
{
return _fs.Seek(pos, (SeekOrigin)whence);
}
#endregion Callbacks
public void Dispose()
{
_fs.Dispose();
_fs = null;
}
}
}
@@ -18,84 +18,85 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
#endif
#endregion arch
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void LogCallback(string message);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention=CallingConvention.Cdecl)]
public static extern void SetLogCallback(LogCallback c);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool Init();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetGlobalVolume(float Volume);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetStreamCount();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void CloseAll();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Load(string Media);
[DllImport(Dll, EntryPoint = "LoadPrescan")]
[DllImport(Dll, EntryPoint = "LoadPrescan", CallingConvention = CallingConvention.Cdecl)]
public static extern int Load(string Media,
[MarshalAs(UnmanagedType.U1)] bool Prescan);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Close(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Play(int Stream);
[DllImport(Dll, EntryPoint = "PlayLoop")]
public static extern void Play(int Stream,
[MarshalAs(UnmanagedType.U1)] bool Loop);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Pause(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Stop(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Fade(int Stream, float TargetVolume, float Seconds);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void FadeAndPause(int Stream, float TargetVolume, float Seconds);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void FadeAndStop(int Stream, float TargetVolume, float Seconds);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetStreamVolume(int Stream, float Volume);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetStreamVolumeMax(int Stream, float Volume);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetLength(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetPosition(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool IsPlaying(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool IsPaused(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool IsFinished(int Stream);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetPosition(int Stream, float Position);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Update();
}
}
+48 -48
View File
@@ -291,10 +291,10 @@ namespace PortAudioSharp
#endif
#endif
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetVersion();
[DllImport(PaDll, EntryPoint = "Pa_GetVersionText")]
[DllImport(PaDll, EntryPoint = "Pa_GetVersionText", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr IntPtr_Pa_GetVersionText();
public static string Pa_GetVersionText()
@@ -303,7 +303,7 @@ namespace PortAudioSharp
return Marshal.PtrToStringAnsi(strptr);
}
[DllImport(PaDll, EntryPoint = "Pa_GetErrorText")]
[DllImport(PaDll, EntryPoint = "Pa_GetErrorText", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IntPtr_Pa_GetErrorText(PaError errorCode);
public static string Pa_GetErrorText(PaError errorCode)
@@ -312,19 +312,19 @@ namespace PortAudioSharp
return Marshal.PtrToStringAnsi(strptr);
}
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_Initialize();
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_Terminate();
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetHostApiCount();
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetDefaultHostApi();
[DllImport(PaDll, EntryPoint = "Pa_GetHostApiInfo")]
[DllImport(PaDll, EntryPoint = "Pa_GetHostApiInfo", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IntPtr_Pa_GetHostApiInfo(int hostApi);
public static PaHostApiInfo Pa_GetHostApiInfo(int hostApi)
@@ -333,13 +333,13 @@ namespace PortAudioSharp
return (PaHostApiInfo)Marshal.PtrToStructure(structptr, typeof(PaHostApiInfo));
}
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_HostApiTypeIdToHostApiIndex(PaHostApiTypeId type);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_HostApiDeviceIndexToDeviceIndex(int hostApi, int hostApiDeviceIndex);
[DllImport(PaDll, EntryPoint = "Pa_GetLastHostErrorInfo")]
[DllImport(PaDll, EntryPoint = "Pa_GetLastHostErrorInfo", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IntPtr_Pa_GetLastHostErrorInfo();
public static PaHostErrorInfo Pa_GetLastHostErrorInfo()
@@ -348,16 +348,16 @@ namespace PortAudioSharp
return (PaHostErrorInfo)Marshal.PtrToStructure(structptr, typeof(PaHostErrorInfo));
}
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetDeviceCount();
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetDefaultInputDevice();
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetDefaultOutputDevice();
[DllImport(PaDll, EntryPoint = "Pa_GetDeviceInfo")]
[DllImport(PaDll, EntryPoint = "Pa_GetDeviceInfo", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IntPtr_Pa_GetDeviceInfo(int device);
public static PaDeviceInfo Pa_GetDeviceInfo(int device)
@@ -366,13 +366,13 @@ namespace PortAudioSharp
return (PaDeviceInfo)Marshal.PtrToStructure(structptr, typeof(PaDeviceInfo));
}
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_IsFormatSupported(
ref PaStreamParameters inputParameters,
ref PaStreamParameters outputParameters,
double sampleRate);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
ref PaStreamParameters inputParameters,
@@ -383,7 +383,7 @@ namespace PortAudioSharp
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
ref PaStreamParameters inputParameters,
@@ -394,7 +394,7 @@ namespace PortAudioSharp
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_OpenStream(
out IntPtr stream,
IntPtr inputParameters,
@@ -405,7 +405,7 @@ namespace PortAudioSharp
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_OpenDefaultStream(
out IntPtr stream,
int numInputChannels,
@@ -416,30 +416,30 @@ namespace PortAudioSharp
PaStreamCallbackDelegate streamCallback,
IntPtr userData);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_CloseStream(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_SetStreamFinishedCallback(
ref IntPtr stream,
[MarshalAs(UnmanagedType.FunctionPtr)] PaStreamFinishedCallbackDelegate streamFinishedCallback);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_StartStream(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_StopStream(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_AbortStream(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_IsStreamStopped(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_IsStreamActive(IntPtr stream);
[DllImport(PaDll, EntryPoint = "Pa_GetStreamInfo")]
[DllImport(PaDll, EntryPoint = "Pa_GetStreamInfo", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IntPtr_Pa_GetStreamInfo(IntPtr stream);
public static PaStreamInfo Pa_GetStreamInfo(IntPtr stream)
@@ -448,106 +448,106 @@ namespace PortAudioSharp
return (PaStreamInfo)Marshal.PtrToStructure(structptr, typeof(PaStreamInfo));
}
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern double Pa_GetStreamTime(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern double Pa_GetStreamCpuLoad(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] float[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] byte[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] sbyte[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] ushort[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] short[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] uint[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_ReadStream(
IntPtr stream,
[Out] int[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] float[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] byte[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] sbyte[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] ushort[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] short[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] uint[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_WriteStream(
IntPtr stream,
[In] int[] buffer,
uint frames);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetStreamReadAvailable(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern int Pa_GetStreamWriteAvailable(IntPtr stream);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern PaError Pa_GetSampleSize(PaSampleFormat format);
[DllImport(PaDll)]
[DllImport(PaDll, CallingConvention = CallingConvention.Cdecl)]
public static extern void Pa_Sleep(int msec);
#endregion
@@ -72,7 +72,7 @@ namespace PortAudioSharp
/// On Windows, the calling application's main window handle,
/// on Macintosh this value should be zero.
/// </param>
[DllImport("PortAudio.dll")]
[DllImport("PortAudio.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern PaError PaAsio_ShowControlPanel(int device, IntPtr systemSpecific);
// /// <summary> Retrieve a pointer to a string containing the name of the specified input channel. </summary>
@@ -93,7 +93,7 @@ namespace PortAudioSharp
/// Note that this function may fail if the stream is alredy running and the
/// ASIO driver does not support switching the sample rate of a running stream.
/// <returns> paIncompatibleStreamHostApi if stream is not a paASIO stream. </returns>
[DllImport("PortAudio.dll")]
[DllImport("PortAudio.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern PaError PaAsio_SetStreamSampleRate(IntPtr stream, double sampleRate);
#endregion
}
+34 -7
View File
@@ -220,6 +220,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
close_proc: TAc_openclose_callback;
proberesult: PAc_proberesult): integer; cdecl; external ac_dll;
*/
/*
[DllImport(AcDll, EntryPoint = "ac_open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern Int32 _ac_open(
IntPtr PAc_instance,
@@ -245,6 +246,23 @@ namespace Vocaluxe.Lib.Video.Acinerella
{
return _ac_open(PAc_instance, sender, open_proc, read_proc, seek_proc, close_proc, proberesult);
}
}*/
[DllImport(AcDll, EntryPoint = "ac_open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern Int32 _ac_open2(
IntPtr PAc_instance,
string filename
);
public static Int32 ac_open2(
IntPtr PAc_instance,
string filename
)
{
lock (_lock)
{
return _ac_open2(PAc_instance, filename);
}
}
// Closes an opened media file.
@@ -296,17 +314,26 @@ namespace Vocaluxe.Lib.Video.Acinerella
[DllImport(AcDll, EntryPoint = "ac_free_package", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public static extern void ac_free_package(IntPtr PAc_package);
// Creates an decoder for the specified stream number. Returns NIL if no decoder
// could be found.
//function ac_create_decoder(pacInstance: PAc_instance; nb: integer): PAc_decoder; cdecl; external ac_dll;
[DllImport(AcDll, EntryPoint = "ac_create_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_decoder(IntPtr PAc_instance, Int32 nb);
public static IntPtr ac_create_decoder(IntPtr PAc_instance, Int32 nb)
[DllImport(AcDll, EntryPoint = "ac_create_video_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_video_decoder(IntPtr PAc_instance);
public static IntPtr ac_create_video_decoder(IntPtr PAc_instance)
{
lock (_lock)
{
return _ac_create_decoder(PAc_instance, nb);
return _ac_create_video_decoder(PAc_instance);
}
}
[DllImport(AcDll, EntryPoint = "ac_create_audio_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_audio_decoder(IntPtr PAc_instance);
public static IntPtr ac_create_audio_decoder(IntPtr PAc_instance)
{
lock (_lock)
{
return _ac_create_audio_decoder(PAc_instance);
}
}
+284 -495
View File
@@ -23,6 +23,7 @@
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
#include <string.h>
#define AUDIO_BUFFER_BASE_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE
@@ -38,15 +39,7 @@
struct _ac_data {
ac_instance instance;
AVFormatContext *pFormatCtx;
void *sender;
ac_openclose_callback open_proc;
ac_read_callback read_proc;
ac_seek_callback seek_proc;
ac_openclose_callback close_proc;
void* buffer;
};
@@ -55,8 +48,6 @@ typedef ac_data* lp_ac_data;
struct _ac_decoder_data {
ac_decoder decoder;
int sought;
double last_timecode;
};
typedef struct _ac_decoder_data ac_decoder_data;
@@ -64,8 +55,6 @@ typedef ac_decoder_data* lp_ac_decoder_data;
struct _ac_video_decoder {
ac_decoder decoder;
int sought;
double last_timecode;
AVCodec *pCodec;
AVCodecContext *pCodecCtx;
AVFrame *pFrame;
@@ -78,10 +67,6 @@ typedef ac_video_decoder* lp_ac_video_decoder;
struct _ac_audio_decoder {
ac_decoder decoder;
int sought;
double last_timecode;
uint8_t *tmp_data;
int tmp_data_length;
int max_buffer_size;
AVCodec *pCodec;
AVCodecContext *pCodecCtx;
@@ -145,225 +130,41 @@ void CALL_CONVT ac_free(lp_ac_instance pacInstance) {
}
}
static int io_read(void *opaque, uint8_t *buf, int buf_size)
{
if (((lp_ac_data)(opaque))->read_proc != NULL) {
return ((lp_ac_data)(opaque))->read_proc(
((lp_ac_data)(opaque))->sender, buf, buf_size);
}
return -1;
}
static int64_t io_seek(void *opaque, int64_t pos, int whence)
{
if (((lp_ac_data)(opaque))->seek_proc != NULL) {
if ((whence >= 0) && (whence <= 2)) {
return ((lp_ac_data)(opaque))->seek_proc(
((lp_ac_data)(opaque))->sender, pos, whence);
}
}
return -1;
}
lp_ac_proberesult CALL_CONVT ac_probe_input_buffer(
void* buf,
int bufsize,
char* filename,
int* score_max)
{
AVProbeData pd;
AVInputFormat *fmt = NULL;
//Initialize FFMpeg libraries
ac_init_ffmpeg();
//Set the filename
pd.filename = "";
if (filename) {
pd.filename = filename;
}
//The given buffer has to be copied to a new one, which is aligned and padded
void* aligned_buf = av_malloc(bufsize + AVPROBE_PADDING_SIZE);
memset(aligned_buf, 0, bufsize + AVPROBE_PADDING_SIZE);
memcpy(aligned_buf, buf, bufsize);
//Set the probe data buffer
pd.buf = aligned_buf;
pd.buf_size = bufsize;
//Test it
fmt = (AVInputFormat*)av_probe_input_format2(&pd, 1, score_max);
//Free the temporary buffer
av_free(aligned_buf);
return (lp_ac_proberesult)fmt;
}
#define PROBE_BUF_MIN 2048
#define PROBE_BUF_MAX (1<<20)
AVInputFormat* ac_probe_input_stream(
void* sender,
ac_read_callback read_proc,
char* filename,
void* *buf,
int* buf_read)
{
//Initialize the result variables
AVInputFormat* fmt = NULL;
*buf_read = 0;
*buf = NULL;
int last_iteration = 0;
int probe_size = 0;
for (probe_size = PROBE_BUF_MIN;
(probe_size <= PROBE_BUF_MAX) && !fmt && !last_iteration;
probe_size<<=1) {
int score = AVPROBE_SCORE_MAX / 4;
//Allocate some memory for the current probe buffer
void* tmp_buf = av_malloc(probe_size); //Unaligned memory would also be ok here
memset(tmp_buf, 0, probe_size);
//Copy the old data to the new buffer
if (*buf) {
memcpy(tmp_buf, *buf, *buf_read);
//Free the old data memory
av_free(*buf);
}
//Read the new data
void* write_ptr = tmp_buf + *buf_read;
int read_size = probe_size - *buf_read;
int size;
if (size = read_proc(sender, write_ptr, read_size) < read_size) {
last_iteration = 1;
probe_size = *buf_read + size;
}
//Probe it
fmt = (AVInputFormat*)ac_probe_input_buffer(tmp_buf, probe_size, filename, &score);
//Set the new buffer
*buf = tmp_buf;
*buf_read = probe_size;
}
//Return the result
return fmt;
}
int CALL_CONVT ac_open(
lp_ac_instance pacInstance,
void *sender,
ac_openclose_callback open_proc,
ac_read_callback read_proc,
ac_seek_callback seek_proc,
ac_openclose_callback close_proc,
lp_ac_proberesult proberesult)
int CALL_CONVT ac_open(lp_ac_instance pacInstance, const char* filename)
{
pacInstance->opened = 0;
//Store the given parameters in the ac Instance
((lp_ac_data)pacInstance)->sender = sender;
((lp_ac_data)pacInstance)->open_proc = open_proc;
((lp_ac_data)pacInstance)->read_proc = read_proc;
((lp_ac_data)pacInstance)->seek_proc = seek_proc;
((lp_ac_data)pacInstance)->close_proc = close_proc;
pacInstance->opened = 0;
//Call the file open proc
if (open_proc != NULL) {
open_proc(sender);
}
AVInputFormat* fmt = NULL;
int probe_size = 0;
//Probe the input format, if no probe result is specified
if(proberesult == NULL)
{
fmt = ac_probe_input_stream(sender, read_proc, "",
(void*)&((lp_ac_data)pacInstance)->buffer, &probe_size);
}
else
{
fmt = (AVInputFormat*)proberesult;
}
if (!fmt) return -1;
/* open input file, and allocate format context */
int ret = 0;
if ((ret = avformat_open_input(&((lp_ac_data)pacInstance)->pFormatCtx, filename, NULL, NULL)) < 0)
{
return ret;
}
((lp_ac_data)pacInstance)->pFormatCtx = avformat_alloc_context();
if (!seek_proc) {
((lp_ac_data)pacInstance)->pFormatCtx->pb = avio_alloc_context(
((lp_ac_data)pacInstance)->buffer,
probe_size, 0, pacInstance, io_read, 0, NULL);
//Feed the probed bytes into the IO-Context
((lp_ac_data)pacInstance)->pFormatCtx->pb->buf_end =
((lp_ac_data)pacInstance)->buffer + probe_size;
((lp_ac_data)pacInstance)->pFormatCtx->pb->pos = probe_size;
} else {
//If the stream is seekable, seek back to the beginning of the stream and
//let FFMpeg start from the beginning
if (((lp_ac_data)pacInstance)->buffer)
av_free(((lp_ac_data)pacInstance)->buffer);
int64_t pos = seek_proc(sender, 0, SEEK_SET);
//Reserve AC_BUFSIZE Bytes of memory
((lp_ac_data)pacInstance)->buffer = av_malloc(AC_BUFSIZE);
((lp_ac_data)pacInstance)->pFormatCtx->pb = avio_alloc_context(
((lp_ac_data)pacInstance)->buffer,
AC_BUFSIZE, 0, pacInstance, io_read, 0, io_seek);
}
//Open the given input stream (the io structure) with the given format of the stream
//(fmt) and write the pointer to the new format context to the pFormatCtx variable
if (avformat_open_input(
&(((lp_ac_data)pacInstance)->pFormatCtx),
"",
fmt,
NULL) < 0)
{
return -1;
}
/* retrieve stream information */
if ((ret = avformat_find_stream_info(((lp_ac_data)pacInstance)->pFormatCtx, NULL)) < 0)
{
return ret;
}
else
pacInstance->info.duration = ((lp_ac_data)pacInstance)->pFormatCtx->duration * 1000 / AV_TIME_BASE;
//Retrieve stream information
AVFormatContext *ctx = ((lp_ac_data)pacInstance)->pFormatCtx;
if(avformat_find_stream_info(ctx, NULL) >= 0) {
pacInstance->info.duration = ctx->duration * 1000 / AV_TIME_BASE;
} else {
return -1;
}
//Set some information in the instance variable
pacInstance->stream_count = ((lp_ac_data)pacInstance)->pFormatCtx->nb_streams;
pacInstance->opened = pacInstance->stream_count > 0;
//Set some information in the instance variable
pacInstance->stream_count = ((lp_ac_data)pacInstance)->pFormatCtx->nb_streams;
pacInstance->opened = pacInstance->stream_count > 0;
return 0;
return 0;
}
void CALL_CONVT ac_close(lp_ac_instance pacInstance) {
if (pacInstance->opened) {
//Close the opened file
if (((lp_ac_data)(pacInstance))->close_proc != NULL) {
((lp_ac_data)(pacInstance))->close_proc(((lp_ac_data)(pacInstance))->sender);
}
//Close the opened file
avformat_close_input(&(((lp_ac_data)(pacInstance))->pFormatCtx));
pacInstance->opened = 0;
//If the seek proc has not been specified, the input buffer is not automatically
//freed, as ffmpeg didn't get the original pointer to the buffer
if (!((lp_ac_data)(pacInstance))->seek_proc &&
((lp_ac_data)(pacInstance))->buffer) {
if (((lp_ac_data)(pacInstance))->buffer) {
av_free(((lp_ac_data)(pacInstance))->buffer);
}
@@ -404,42 +205,13 @@ void CALL_CONVT ac_get_stream_info(lp_ac_instance pacInstance, int nb, lp_ac_str
info->stream_type = AC_STREAM_TYPE_AUDIO;
//Store more information about the video stream
info->audio_info.samples_per_second =
info->audio_info.samples_per_second =
((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec->sample_rate;
info->audio_info.channel_count =
((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec->channels;
// Set bit depth
switch (((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec->sample_fmt) {
//8-Bit
case AV_SAMPLE_FMT_U8:
info->audio_info.bit_depth =
8;
break;
//16-Bit
case AV_SAMPLE_FMT_S16:
info->audio_info.bit_depth =
16;
break;
/* //24-Bit (removed in the newest ffmpeg version)
case SAMPLE_FMT_S24:
info->additional_info.audio_info.bit_depth =
24;
break; */
//32-Bit
case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_FLT:
info->audio_info.bit_depth =
32;
break;
//Unknown format, return zero
default:
info->audio_info.bit_depth =
0;
}
info->audio_info.channel_count = 2;
//((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec->channels;
// Set bit depth (its always 16Bit because of the conversion!
info->audio_info.bit_depth = 16;
break;
default:
@@ -474,7 +246,8 @@ lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance) {
}
//Frees the currently loaded package
void CALL_CONVT ac_free_package(lp_ac_package pPackage) {
void CALL_CONVT ac_free_package(lp_ac_package pPackage)
{
//Free the packet
if (pPackage != NULL) {
AVPacket* pkt = &((lp_ac_package_data)pPackage)->ffpackage;
@@ -500,112 +273,98 @@ enum PixelFormat convert_pix_format(ac_output_format fmt) {
return PIX_FMT_RGB32;
}
//Init a video decoder
void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info, int nb) {
//Allocate memory for a new decoder instance
lp_ac_video_decoder pDecoder;
pDecoder = (lp_ac_video_decoder)(av_malloc(sizeof(ac_video_decoder)));
memset(pDecoder, 0, sizeof(ac_video_decoder));
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
pDecoder->decoder.type = AC_DECODER_TYPE_VIDEO;
pDecoder->decoder.stream_index = nb;
pDecoder->pCodecCtx = ((lp_ac_data)(pacInstance))->pFormatCtx->streams[nb]->codec;
pDecoder->decoder.stream_info = *info;
//Find correspondenting codec
if (!(pDecoder->pCodec = avcodec_find_decoder(pDecoder->pCodecCtx->codec_id))) {
return NULL; //Codec could not have been found
}
lp_ac_decoder CALL_CONVT ac_create_video_decoder(lp_ac_instance pacInstance) {
//Allocate memory for a new decoder instance
lp_ac_video_decoder pDecoder;
pDecoder = (lp_ac_video_decoder)(av_malloc(sizeof(ac_video_decoder)));
memset(pDecoder, 0, sizeof(ac_video_decoder));
pDecoder->pCodecCtx->thread_count = 1; //this is for HT CPUs, it should be
// tested if there is a better solution
int nb = av_find_best_stream(((lp_ac_data)pacInstance)->pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
if (nb < 0)
return NULL;
ac_stream_info info;
ac_get_stream_info(pacInstance, nb, &info);
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
pDecoder->decoder.type = AC_DECODER_TYPE_VIDEO;
pDecoder->decoder.stream_index = nb;
pDecoder->decoder.video_clock = 0;
pDecoder->pCodecCtx = ((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec;
pDecoder->decoder.stream_info = info;
pDecoder->pCodecCtx->thread_count = 1; //this is for HT CPUs, it should be
// tested if there is a better solution
//Find correspondenting codec
if (!(pDecoder->pCodec = avcodec_find_decoder(pDecoder->pCodecCtx->codec_id)))
return NULL; //Codec could not have been found
//Open codec
if (avcodec_open2(pDecoder->pCodecCtx, pDecoder->pCodec, NULL) < 0) {
return NULL; //Codec could not have been opened
}
//Reserve frame variables
pDecoder->pFrame = avcodec_alloc_frame();
pDecoder->pFrameRGB = avcodec_alloc_frame();
pDecoder->pSwsCtx = NULL;
//Reserve buffer memory
pDecoder->decoder.buffer_size = avpicture_get_size(convert_pix_format(pacInstance->output_format),
pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
pDecoder->decoder.pBuffer = (uint8_t*)av_malloc(pDecoder->decoder.buffer_size);
//Open codec
if (avcodec_open2(pDecoder->pCodecCtx, pDecoder->pCodec, NULL) < 0)
return NULL; //Codec could not have been opened
//Link decoder to buffer
avpicture_fill(
(AVPicture*)(pDecoder->pFrameRGB),
pDecoder->decoder.pBuffer, convert_pix_format(pacInstance->output_format),
pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
return (void*)pDecoder;
//Reserve frame variables
pDecoder->pFrame = avcodec_alloc_frame();
pDecoder->pFrameRGB = avcodec_alloc_frame();
pDecoder->pSwsCtx = NULL;
//Reserve buffer memory
pDecoder->decoder.buffer_size = avpicture_get_size(convert_pix_format(pacInstance->output_format),
pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
pDecoder->decoder.pBuffer = (uint8_t*)av_malloc(pDecoder->decoder.buffer_size);
//Link decoder to buffer
avpicture_fill(
(AVPicture*)(pDecoder->pFrameRGB),
pDecoder->decoder.pBuffer, convert_pix_format(pacInstance->output_format),
pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height);
return (void*)pDecoder;
}
//Init a audio decoder
void* ac_create_audio_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info, int nb) {
//Allocate memory for a new decoder instance
lp_ac_audio_decoder pDecoder;
pDecoder = (lp_ac_audio_decoder)(av_malloc(sizeof(ac_audio_decoder)));
memset(pDecoder, 0, sizeof(ac_audio_decoder));
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
pDecoder->decoder.type = AC_DECODER_TYPE_AUDIO;
pDecoder->decoder.stream_index = nb;
pDecoder->decoder.stream_info = *info;
pDecoder->decoder.video_clock = 0;
//Temporary store codec context pointer
AVCodecContext *pCodecCtx = ((lp_ac_data)(pacInstance))->pFormatCtx->streams[nb]->codec;
pDecoder->pCodecCtx = pCodecCtx;
//Find correspondenting codec
if (!(pDecoder->pCodec = avcodec_find_decoder(pCodecCtx->codec_id))) {
return NULL;
}
//Open codec
if (avcodec_open2(pCodecCtx, pDecoder->pCodec, NULL) < 0) {
return NULL;
}
lp_ac_decoder CALL_CONVT ac_create_audio_decoder(lp_ac_instance pacInstance)
{
//Allocate memory for a new decoder instance
lp_ac_audio_decoder pDecoder;
pDecoder = (lp_ac_audio_decoder)(av_malloc(sizeof(ac_audio_decoder)));
memset(pDecoder, 0, sizeof(ac_audio_decoder));
//Initialize the buffers
pDecoder->decoder.pBuffer = NULL; //av_malloc(AUDIO_BUFFER_BASE_SIZE);
pDecoder->decoder.buffer_size = 0;
pDecoder->max_buffer_size = 0;
int nb = av_find_best_stream(((lp_ac_data)pacInstance)->pFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);
if (nb < 0)
return NULL;
ac_stream_info info;
ac_get_stream_info(pacInstance, nb, &info);
pDecoder->tmp_data = NULL;
pDecoder->tmp_data_length = 0;
return (void*)pDecoder;
}
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
pDecoder->decoder.type = AC_DECODER_TYPE_AUDIO;
pDecoder->decoder.stream_index = nb;
pDecoder->decoder.stream_info = info;
pDecoder->decoder.video_clock = 0;
//Temporary store codec context pointer
AVCodecContext *pCodecCtx = ((lp_ac_data)pacInstance)->pFormatCtx->streams[nb]->codec;
pDecoder->pCodecCtx = pCodecCtx;
//pDecoder->pCodecCtx->thread_count = 1; //this is for HT CPUs, it should be
// tested if there is a better solution
//Find correspondenting codec
if (!(pDecoder->pCodec = avcodec_find_decoder(pCodecCtx->codec_id)))
return NULL;
lp_ac_decoder CALL_CONVT ac_create_decoder(lp_ac_instance pacInstance, int nb) {
//Get information about the chosen data stream and create an decoder that can
//handle this kind of stream.
ac_stream_info info;
ac_get_stream_info(pacInstance, nb, &info);
lp_ac_decoder result;
if (info.stream_type == AC_STREAM_TYPE_VIDEO) {
result = ac_create_video_decoder(pacInstance, &info, nb);
}
else if (info.stream_type == AC_STREAM_TYPE_AUDIO) {
result = ac_create_audio_decoder(pacInstance, &info, nb);
}
((lp_ac_decoder_data)result)->last_timecode = 0;
((lp_ac_decoder_data)result)->sought = 1;
result->video_clock = 0;
return result;
//Open codec
if (avcodec_open2(pCodecCtx, pDecoder->pCodec, NULL) < 0)
return NULL;
//Initialize the buffers
pDecoder->decoder.pBuffer = av_malloc(AUDIO_BUFFER_BASE_SIZE);
pDecoder->decoder.buffer_size = 0;
pDecoder->max_buffer_size = AUDIO_BUFFER_BASE_SIZE;
return (void*)pDecoder;
}
double ac_sync_video(lp_ac_package pPackage, lp_ac_decoder pDec, AVFrame *src_frame, double pts){
@@ -643,13 +402,7 @@ int ac_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDecoder
pkt_tmp.size -= len;
pkt_tmp.data += len;
}
/*
avcodec_decode_video2(
pDecoder->pCodecCtx, pDecoder->pFrame, &finished,
&(((lp_ac_package_data)pPackage)->ffpackage));
*/
if (finished != 0) {
pDecoder->pSwsCtx = sws_getCachedContext(pDecoder->pSwsCtx,
pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height, pDecoder->pCodecCtx->pix_fmt,
@@ -687,6 +440,17 @@ int ac_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDecoder
return 0;
}
int alloc_samples_array_and_data(uint8_t ***data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
{
int nb_planes = av_sample_fmt_is_planar(sample_fmt) ? nb_channels : 1;
*data = av_malloc(sizeof(*data) * nb_planes);
if (!*data)
return AVERROR(ENOMEM);
return av_samples_alloc(*data, linesize, nb_channels,
nb_samples, sample_fmt, align);
}
int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder, lp_ac_decoder pDec) {
double pts;
//Variables describing the destination buffer
@@ -694,17 +458,8 @@ int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder
//Make a copy of the package read by avformat, so that we can move the data pointers around
AVPacket pkt_tmp = ((lp_ac_package_data)pPackage)->ffpackage;
AVFrame *decoded_frame = NULL;
if (pDecoder->tmp_data_length > 0)
{
pkt_tmp.data = av_realloc(pkt_tmp.data, pkt_tmp.size + pDecoder->tmp_data_length);
pkt_tmp.size = pkt_tmp.size + pDecoder->tmp_data_length;
memcpy(pkt_tmp.data + pDecoder->tmp_data_length, &pkt_tmp.data, pkt_tmp.size);
memcpy(&pkt_tmp.data, pDecoder->tmp_data, pDecoder->tmp_data_length);
}
while (pkt_tmp.size > 0) {
if (!decoded_frame) {
@@ -718,7 +473,6 @@ int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder
int len1 = avcodec_decode_audio4(pDecoder->pCodecCtx, decoded_frame, &got_frame, &pkt_tmp);
//If an error occured, skip the frame
if (len1 < 0){
return 0;
@@ -729,67 +483,105 @@ int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder
pkt_tmp.data += len1;
if (got_frame){
int data_size = av_samples_get_buffer_size(NULL, (pDecoder->pCodecCtx)->channels,
decoded_frame->nb_samples,
(pDecoder->pCodecCtx)->sample_fmt, 1);
//Reserve enough memory for coping the result data
if (dest_buffer_pos + data_size > pDecoder->max_buffer_size) {
pDecoder->decoder.pBuffer = av_realloc(pDecoder->decoder.pBuffer, dest_buffer_pos + data_size);
pDecoder->max_buffer_size = dest_buffer_pos + data_size;
}
memcpy(pDecoder->decoder.pBuffer + dest_buffer_pos, decoded_frame->data[0], data_size);
//Increment the destination buffer pointers, copy the result to the output buffer
dest_buffer_pos += data_size;
pDecoder->decoder.buffer_size += data_size;
pts=0;
if(((lp_ac_package_data)pPackage)->ffpackage.dts != AV_NOPTS_VALUE){
pts = ((lp_ac_package_data)pPackage)->ffpackage.dts * av_q2d(((lp_ac_data)pDec->pacInstance)->pFormatCtx->streams[pPackage->stream_index]->time_base);
pDec->video_clock = pts;
} else {
pts = pDec->video_clock;
}
double bytes_per_second = 2 * pDec->stream_info.audio_info.samples_per_second * pDec->stream_info.audio_info.channel_count;
if (bytes_per_second > 0)
pDec->video_clock += data_size / bytes_per_second;
struct SwrContext *swr_ctx;
int dst_nb_samples = 0, max_dst_nb_samples = 0, dst_linesize = 0;
uint8_t **dst_data = NULL;
int ret = 0;
int dst_sample_rate = (pDecoder->pCodecCtx)->sample_rate;
pDec->timecode = pts;
swr_ctx = swr_alloc();
if (pkt_tmp.size > 0)
{
pDecoder->tmp_data = av_malloc(pkt_tmp.size);
memcpy(pDecoder->tmp_data, &pkt_tmp.data, pkt_tmp.size);
} else {
av_free(pDecoder->tmp_data);
pDecoder->tmp_data_length = 0;
}
/* set options */
av_opt_set_int(swr_ctx, "in_channel_layout", (pDecoder->pCodecCtx)->channel_layout, 0);
av_opt_set_int(swr_ctx, "in_sample_rate", (pDecoder->pCodecCtx)->sample_rate, 0);
av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", (pDecoder->pCodecCtx)->sample_fmt, 0);
av_opt_set_int(swr_ctx, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
av_opt_set_int(swr_ctx, "out_sample_rate", dst_sample_rate, 0);
av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
if (swr_init(swr_ctx) < 0)
return 0;
/* compute the number of converted samples: buffering is avoided
* ensuring that the output buffer will contain at least all the
* converted input samples */
max_dst_nb_samples = dst_nb_samples = av_rescale_rnd(
decoded_frame->nb_samples, dst_sample_rate, (pDecoder->pCodecCtx)->sample_rate, AV_ROUND_UP);
if (alloc_samples_array_and_data(&dst_data, &dst_linesize, 2, dst_nb_samples, AV_SAMPLE_FMT_S16, 0) < 0)
return 0;
/* compute destination number of samples */
dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_ctx, (pDecoder->pCodecCtx)->sample_rate) +
decoded_frame->nb_samples, dst_sample_rate, (pDecoder->pCodecCtx)->sample_rate, AV_ROUND_UP);
if (dst_nb_samples > max_dst_nb_samples) {
av_free(dst_data[0]);
ret = av_samples_alloc(dst_data, &dst_linesize, 2,
dst_nb_samples, AV_SAMPLE_FMT_S16, 1);
if (ret < 0)
return 0;
max_dst_nb_samples = dst_nb_samples;
}
if ((ret = swr_convert(swr_ctx, dst_data, dst_nb_samples, (const uint8_t **)decoded_frame->data, decoded_frame->nb_samples)) < 0)
return 0;
int data_size = av_samples_get_buffer_size(&dst_linesize, 2, ret, AV_SAMPLE_FMT_S16, 1);
//Reserve enough memory for coping the result data
if (dest_buffer_pos + data_size > pDecoder->max_buffer_size) {
pDecoder->decoder.pBuffer = av_realloc(pDecoder->decoder.pBuffer, dest_buffer_pos + data_size);
pDecoder->max_buffer_size = dest_buffer_pos + data_size;
}
memcpy(pDecoder->decoder.pBuffer + dest_buffer_pos, dst_data[0], data_size);
//Increment the destination buffer pointers, copy the result to the output buffer
dest_buffer_pos += data_size;
pDecoder->decoder.buffer_size += data_size;
pts=0;
if(((lp_ac_package_data)pPackage)->ffpackage.dts != AV_NOPTS_VALUE){
pts = ((lp_ac_package_data)pPackage)->ffpackage.dts * av_q2d(((lp_ac_data)pDec->pacInstance)->pFormatCtx->streams[pPackage->stream_index]->time_base);
return 1;
pDec->video_clock = pts;
} else {
pts = pDec->video_clock;
}
double bytes_per_second = 4 * pDec->stream_info.audio_info.samples_per_second;
if (bytes_per_second > 0)
pDec->video_clock += data_size / bytes_per_second;
pDec->timecode = pts;
if (dst_data)
av_freep(&dst_data[0]);
av_freep(&dst_data);
swr_free(&swr_ctx);
return 1;
}
}
av_free(pDecoder->tmp_data);
pDecoder->tmp_data_length;
return 0;
}
int CALL_CONVT ac_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder) {
if (pDecoder->type == AC_DECODER_TYPE_AUDIO) {
return ac_decode_audio_package(pPackage, (lp_ac_audio_decoder)pDecoder, pDecoder);
} else if (pDecoder->type == AC_DECODER_TYPE_VIDEO) {
return ac_decode_video_package(pPackage, (lp_ac_video_decoder)pDecoder, pDecoder);
}
return 0;
int CALL_CONVT ac_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder)
{
if (pDecoder->type == AC_DECODER_TYPE_AUDIO)
return ac_decode_audio_package(pPackage, (lp_ac_audio_decoder)pDecoder, pDecoder);
else if (pDecoder->type == AC_DECODER_TYPE_VIDEO)
return ac_decode_video_package(pPackage, (lp_ac_video_decoder)pDecoder, pDecoder);
return 0;
}
int CALL_CONVT ac_drop_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder) {
int CALL_CONVT ac_drop_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder)
{
if (pDecoder->type == AC_DECODER_TYPE_VIDEO) {
return ac_drop_decode_video_package(pPackage, (lp_ac_video_decoder)pDecoder, pDecoder);
}
@@ -818,7 +610,6 @@ int ac_drop_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDe
if (finished) {
pts=0;
//global_video_pkt_pts = ((lp_ac_package_data)pPackage)->ffpackage.pts;
if(((lp_ac_package_data)pPackage)->ffpackage.dts == AV_NOPTS_VALUE &&
*(uint64_t*)pDecoder->pFrame->opaque != AV_NOPTS_VALUE ){
@@ -843,20 +634,17 @@ int ac_drop_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDe
return 0;
}
int CALL_CONVT ac_get_audio_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder) {
int CALL_CONVT ac_get_audio_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder)
{
lp_ac_package pPackage = ac_read_package(pacInstance);
((lp_ac_audio_decoder)pDecoder)->decoder.buffer_size = 0;
int done = 0;
while(done == 0 && pPackage != NULL){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index)
{
done = ac_decode_package(pPackage, pDecoder);
ac_free_package(pPackage);
if (((lp_ac_audio_decoder)pDecoder)->decoder.buffer_size < 4096)
done = 0;
if (done == 0)
pPackage = ac_read_package(pacInstance);
@@ -872,19 +660,21 @@ int CALL_CONVT ac_get_audio_frame(lp_ac_instance pacInstance, lp_ac_decoder pDec
return 1;
}
int CALL_CONVT ac_get_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder) {
int CALL_CONVT ac_get_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder)
{
lp_ac_package pPackage = ac_read_package(pacInstance);
int done = 0;
int pcount = 0;
while(done == 0 && pPackage != NULL){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index)
{
done = ac_decode_package(pPackage, pDecoder);
ac_free_package(pPackage);
pcount++;
if (done == 0)
pPackage = ac_read_package(pacInstance);
} else {
} else
{
ac_free_package(pPackage);
pPackage = ac_read_package(pacInstance);
}
@@ -896,25 +686,28 @@ int CALL_CONVT ac_get_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder)
return pcount;
}
int CALL_CONVT ac_skip_frames(lp_ac_instance pacInstance, lp_ac_decoder pDecoder, int num) {
int CALL_CONVT ac_skip_frames(lp_ac_instance pacInstance, lp_ac_decoder pDecoder, int num)
{
lp_ac_package pPackage = ac_read_package(pacInstance);
int done = 0;
int i;
for(i=0; i<num; i++){
for(i=0; i<num; i++)
{
if (i>0)
pPackage = ac_read_package(pacInstance);
done = 0;
while(done == 0 && pPackage != NULL){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index){
if (((lp_ac_package_data)pPackage)->package.stream_index == pDecoder->stream_index)
{
done = ac_drop_decode_package(pPackage, pDecoder);
ac_free_package(pPackage);
if (done == 0)
pPackage = ac_read_package(pacInstance);
} else {
} else
{
ac_free_package(pPackage);
pPackage = ac_read_package(pacInstance);
}
@@ -930,73 +723,69 @@ int CALL_CONVT ac_skip_frames(lp_ac_instance pacInstance, lp_ac_decoder pDecoder
return 1;
}
//Seek function
int CALL_CONVT ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos) {
AVRational timebase =
((lp_ac_data)pDecoder->pacInstance)->pFormatCtx->streams[pDecoder->stream_index]->time_base;
int CALL_CONVT ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos)
{
AVRational timebase = ((lp_ac_data)pDecoder->pacInstance)->pFormatCtx->streams[pDecoder->stream_index]->time_base;
int flags = dir < 0 ? AVSEEK_FLAG_BACKWARD : 0;
int64_t pos = av_rescale(target_pos, AV_TIME_BASE, 1000);
pDecoder->timecode = target_pos / 1000.0;
pDecoder->video_clock = target_pos / 1000.0;
int flags = dir < 0 ? AVSEEK_FLAG_BACKWARD : 0;
int64_t pos = av_rescale(target_pos, AV_TIME_BASE, 1000);
((lp_ac_decoder_data)pDecoder)->sought = 100;
pDecoder->timecode = target_pos / 1000;
if (av_seek_frame(((lp_ac_data)pDecoder->pacInstance)->pFormatCtx, pDecoder->stream_index,
av_rescale_q(pos, AV_TIME_BASE_Q, timebase), flags) >= 0) {
if (pDecoder->type == AC_DECODER_TYPE_AUDIO)
if (av_seek_frame(((lp_ac_data)pDecoder->pacInstance)->pFormatCtx, pDecoder->stream_index,
av_rescale_q(pos, AV_TIME_BASE_Q, timebase), flags) >= 0)
{
if (((lp_ac_audio_decoder)pDecoder)->pCodecCtx->codec->flush != NULL)
avcodec_flush_buffers(((lp_ac_audio_decoder)pDecoder)->pCodecCtx);
av_free(((lp_ac_audio_decoder)pDecoder)->tmp_data);
((lp_ac_audio_decoder)pDecoder)->tmp_data_length = 0;
if (pDecoder->type == AC_DECODER_TYPE_AUDIO)
{
if (((lp_ac_audio_decoder)pDecoder)->pCodecCtx->codec->flush != NULL)
avcodec_flush_buffers(((lp_ac_audio_decoder)pDecoder)->pCodecCtx);
}
if (pDecoder->type == AC_DECODER_TYPE_VIDEO)
{
if (((lp_ac_video_decoder)pDecoder)->pCodecCtx->codec->flush != NULL)
avcodec_flush_buffers(((lp_ac_video_decoder)pDecoder)->pCodecCtx);
}
return 1;
}
return 1;
}
return 0;
return 0;
}
//Free video decoder
void ac_free_video_decoder(lp_ac_video_decoder pDecoder) {
av_free(pDecoder->pFrame);
av_free(pDecoder->pFrameRGB);
if (pDecoder->pSwsCtx != NULL) {
sws_freeContext(pDecoder->pSwsCtx);
}
avcodec_close(pDecoder->pCodecCtx);
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
//Free reserved memory for decoder record
av_free(pDecoder);
void ac_free_video_decoder(lp_ac_video_decoder pDecoder)
{
av_free(pDecoder->pFrame);
av_free(pDecoder->pFrameRGB);
if (pDecoder->pSwsCtx != NULL)
sws_freeContext(pDecoder->pSwsCtx);
avcodec_close(pDecoder->pCodecCtx);
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
//Free reserved memory for decoder record
av_free(pDecoder);
}
//Free video decoder
void ac_free_audio_decoder(lp_ac_audio_decoder pDecoder) {
// av_free(pDecoder->decoder.pBuffer);
avcodec_close(pDecoder->pCodecCtx);
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
//Free the memory reserved for the temporary audio buffer
av_free(pDecoder->tmp_data);
void ac_free_audio_decoder(lp_ac_audio_decoder pDecoder)
{
avcodec_close(pDecoder->pCodecCtx);
//Free reserved memory for decoder record
av_free(pDecoder);
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
//Free reserved memory for decoder record
av_free(pDecoder);
}
void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder) {
if (pDecoder->type == AC_DECODER_TYPE_VIDEO) {
ac_free_video_decoder((lp_ac_video_decoder)pDecoder);
}
else if (pDecoder->type == AC_DECODER_TYPE_AUDIO) {
ac_free_audio_decoder((lp_ac_audio_decoder)pDecoder);
}
void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder)
{
if (pDecoder->type == AC_DECODER_TYPE_VIDEO)
ac_free_video_decoder((lp_ac_video_decoder)pDecoder);
else if (pDecoder->type == AC_DECODER_TYPE_AUDIO)
ac_free_audio_decoder((lp_ac_audio_decoder)pDecoder);
}
+9 -40
View File
@@ -113,7 +113,7 @@ struct _ac_audio_stream_info {
/*Bits per sample. Can be 8 or 16 Bit.*/
int bit_depth;
/*Count of channels in the audio stream.*/
int channel_count;
int channel_count;
};
typedef struct _ac_audio_stream_info ac_audio_stream_info;
@@ -167,44 +167,17 @@ typedef struct _ac_package ac_package;
/*Pointer on TAc_package*/
typedef ac_package* lp_ac_package;
typedef void* lp_ac_proberesult;
/*Callback function used to ask the application to read data. Should return
the number of bytes read or an value smaller than zero if an error occured.*/
typedef int CALL_CONVT (*ac_read_callback)(void *sender, char *buf, int size);
/*Callback function used to ask the application to seek. return 0 if succeed , -1 on failure.*/
typedef int64_t CALL_CONVT (*ac_seek_callback)(void *sender, int64_t pos, int whence);
/*Callback function that is used to notify the application when the data stream
is opened or closed. For example the file pointer should be resetted to zero
when the "open" function is called.*/
typedef int CALL_CONVT (*ac_openclose_callback)(void *sender);
typedef void* CALL_CONVT (*ac_malloc_callback)(size_t size);
typedef void* CALL_CONVT (*ac_realloc_callback)(void *ptr, size_t size);
typedef void CALL_CONVT (*ac_free_callback)(void *ptr);
/*Initializes an Acinerella instance.*/
extern lp_ac_instance CALL_CONVT ac_init(void);
extern void CALL_CONVT ac_free(lp_ac_instance pacInstance);
/*Opens a media file.
@param(inst specifies the Acinerella Instance the stream should be opened for)
@param(sender specifies a pointer that is sent to all callback functions to
allow you to do object orientated programming. May be NULL.)
@param(open_proc specifies the callback function that is called, when the
media file is opened. May be NULL.)
@param(seek_proc specifies the callback function that is called, when the ffmpeg decoder
wants to seek in the file. May be NULL)
@param(close_proc specifies the callback function that is called when the media
file is closed. May be NULL.)*/
extern int CALL_CONVT ac_open(
/*Opens a media file.*/
extern int CALL_CONVT ac_open2(
lp_ac_instance pacInstance,
void *sender,
ac_openclose_callback open_proc,
ac_read_callback read_proc,
ac_seek_callback seek_proc,
ac_openclose_callback close_proc,
lp_ac_proberesult proberesult);
const char* filename
);
/*Closes an opened media file.*/
extern void CALL_CONVT ac_close(lp_ac_instance pacInstance);
@@ -216,9 +189,8 @@ extern lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance);
/*Frees a package that has been read.*/
extern void CALL_CONVT ac_free_package(lp_ac_package pPackage);
/*Creates an decoder for the specified stream number. Returns NIL if no decoder
could be found.*/
extern lp_ac_decoder CALL_CONVT ac_create_decoder(lp_ac_instance pacInstance, int nb);
extern lp_ac_decoder CALL_CONVT ac_create_audio_decoder(lp_ac_instance pacInstance);
extern lp_ac_decoder CALL_CONVT ac_create_video_decoder(lp_ac_instance pacInstance);
/*Frees an created decoder.*/
extern void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder);
/*Decodes a package using the specified decoder. The decodec data is stored in the
@@ -235,7 +207,4 @@ but seeks the whole file forward. The stream number paremter (nb) is only used f
The parameter "dir" specifies the seek direction: 0 for forward, -1 for backward.
The target_pos paremeter is in milliseconds. Returns 1 if the functions succeded.*/
extern int CALL_CONVT ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos);
extern lp_ac_proberesult CALL_CONVT ac_probe_input_buffer(void* buf, int bufsize, char* filename, int* score_max);
#endif /*VIDEOPLAY_H*/
+16 -49
View File
@@ -194,10 +194,6 @@ namespace Vocaluxe.Lib.Video
private int _StreamID; // stream ID for stream closing
private string _FileName; // current video file name
private FileStream _fs; // video file stream
private readonly TAc_read_callback _rc; // read callback for acinerella
private readonly TAc_seek_callback _sc; // seek callback for acinerella
private bool _FileOpened;
private float _VideoTimeBase; // frame time
@@ -237,8 +233,6 @@ namespace Vocaluxe.Lib.Video
public Decoder()
{
_rc = read_proc;
_sc = seek_proc;
_thread = new Thread(Execute);
}
@@ -359,6 +353,9 @@ namespace Vocaluxe.Lib.Video
#region Threading
private void DoSkip()
{
if (!_FileOpened)
return;
_VideoSkipTime = _Gap;
_SkipTime = _Start + _Gap;
_BeforeLoop = false;
@@ -449,14 +446,11 @@ namespace Vocaluxe.Lib.Video
TAc_instance Instance = new TAc_instance();
try
{
_fs = new FileStream(_FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
_instance = CAcinerella.ac_init();
CAcinerella.ac_open(_instance, IntPtr.Zero, null, _rc, _sc, null, IntPtr.Zero);
CAcinerella.ac_open2(_instance, _FileName);
Instance = (TAc_instance)Marshal.PtrToStructure(_instance, typeof(TAc_instance));
ok = true;
ok = Instance.opened;
}
catch (Exception)
{
@@ -474,20 +468,19 @@ namespace Vocaluxe.Lib.Video
_Duration = Instance.info.duration / 1000f;
int VideoStreamIndex = -1;
TAc_stream_info Info = new TAc_stream_info();
for (int i = 0; i < Instance.stream_count; i++)
TAc_decoder Videodecoder;
try
{
CAcinerella.ac_get_stream_info(_instance, i, out Info);
if (Info.stream_type == TAc_stream_type.AC_STREAM_TYPE_VIDEO)
{
_videodecoder = CAcinerella.ac_create_decoder(_instance, i);
VideoStreamIndex = i;
break;
}
_videodecoder = CAcinerella.ac_create_video_decoder(_instance);
Videodecoder = (TAc_decoder)Marshal.PtrToStructure(_videodecoder, typeof(TAc_decoder));
VideoStreamIndex = Videodecoder.stream_index;
}
catch (Exception)
{
CLog.LogError("Error opening video file (can't find decoder): " + _FileName);
return;
}
if (VideoStreamIndex < 0)
{
@@ -495,8 +488,6 @@ namespace Vocaluxe.Lib.Video
return;
}
TAc_decoder Videodecoder = (TAc_decoder)Marshal.PtrToStructure(_videodecoder, typeof(TAc_decoder));
_Width = Videodecoder.stream_info.video_info.frame_width;
_Height = Videodecoder.stream_info.video_info.frame_height;
@@ -656,9 +647,6 @@ namespace Vocaluxe.Lib.Video
_NewFrame = false;
}
}
//if (!_BufferFull)
// EventDecode.Set();
}
private void UploadNewFrame(ref STexture frame)
@@ -685,7 +673,6 @@ namespace Vocaluxe.Lib.Video
_CurrentVideoTime = _FrameBuffer[num].time;
}
_Finished = false;
//EventDecode.Set();
}
else
{
@@ -738,28 +725,8 @@ namespace Vocaluxe.Lib.Video
}
#endregion Threading
#region Callbacks
private Int32 read_proc(IntPtr sender, IntPtr buf, Int32 size)
{
Int32 r = 0;
byte[] bb = new byte[size];
r = _fs.Read(bb, 0, size);
Marshal.Copy(bb, 0, buf, size);
return r;
}
private Int64 seek_proc(IntPtr sender, Int64 pos, Int32 whence)
{
return _fs.Seek(pos, (SeekOrigin)whence);
}
#endregion Callbacks
public void Dispose()
{
_fs.Dispose();
_fs = null;
}
}
}
@@ -26,7 +26,7 @@ namespace Vocaluxe.Lib.Video.Gstreamer
#region arch
#if ARCH_X86
#if WIN
private const string Dll = "x86\\gstreamerhelper.dll";
private const string Dll = "x86\\gstreamer\\gstreamerhelper.dll";
#endif
#endif
@@ -37,32 +37,33 @@ namespace Vocaluxe.Lib.Video.Gstreamer
#endif
#endregion arch
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void LogCallback(string message);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetVideoLogCallback(LogCallback c);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool InitVideo();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void CloseAllVideos();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern int LoadVideo(string VideoFileName);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool CloseVideo(int StreamID);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern int GetVideoNumStreams();
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetVideoLength(int StreamID);
[DllImport(Dll, EntryPoint = "GetFrame")]
[DllImport(Dll, EntryPoint = "GetFrame", CallingConvention = CallingConvention.Cdecl)]
public static extern NativeFrame GetFrameNative(int StreamID, float Time);
public static ManagedFrame GetFrame(int StreamID, float Time)
@@ -86,25 +87,25 @@ namespace Vocaluxe.Lib.Video.Gstreamer
return m;
}
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool Skip(int StreamID, float Start, float Gap);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void SetVideoLoop(int StreamID,
[MarshalAs(UnmanagedType.U1)] bool Loop);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void PauseVideo(int StreamID);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
public static extern void ResumeVideo(int StreamID);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool Finished(int StreamID);
[DllImport(Dll)]
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
public static extern bool UpdateVideo();
}
+5 -2
View File
@@ -580,8 +580,11 @@ namespace Vocaluxe.Screens
//Update texture and name
if (CConfig.Players[i].Length > 0)
{
Statics[StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[TextPlayer[i]].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
if (CGame.Player[i].ProfileID > -1 && CProfiles.NumProfiles > CGame.Player[i].ProfileID)
{
Statics[StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[TextPlayer[i]].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
}
}
if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
{
+2 -2
View File
@@ -1342,7 +1342,7 @@ namespace Vocaluxe.Screens
{
for (int i = 0; i < CGame.NumPlayer; i++)
{
if (CGame.Player[i].ProfileID > -1)
if (CGame.Player[i].ProfileID > -1 && CProfiles.NumProfiles > CGame.Player[i].ProfileID)
Statics[StaticAvatars[i, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
else
Statics[StaticAvatars[i, CGame.NumPlayer - 1]].Visible = false;
@@ -1353,7 +1353,7 @@ namespace Vocaluxe.Screens
{
for (int i = 0; i < CGame.NumPlayer; i++)
{
if (CGame.Player[i].ProfileID > -1)
if (CGame.Player[i].ProfileID > -1 && CProfiles.NumProfiles > CGame.Player[i].ProfileID)
Texts[TextNames[i, CGame.NumPlayer - 1]].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
else
Texts[TextNames[i, CGame.NumPlayer - 1]].Visible = false;
+2 -2
View File
@@ -10,12 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vocaluxe</RootNamespace>
<AssemblyName>Vocaluxe</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<StartupObject>Vocaluxe.MainProgram</StartupObject>
<ApplicationIcon>Vocaluxe.ico</ApplicationIcon>
<TargetFrameworkProfile />
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup>
</configuration>
+89
View File
@@ -0,0 +1,89 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace VocaluxeLib.Menu
{
public class CPoints
{
private readonly SPlayer[,] _Rounds;
public CPoints(int NumRounds, SPlayer[] Player)
{
_Rounds = new SPlayer[NumRounds, Player.Length];
for (int round = 0; round < NumRounds; round++)
{
for (int player = 0; player < Player.Length; player++)
{
_Rounds[round, player].ProfileID = Player[player].ProfileID;
_Rounds[round, player].Name = Player[player].Name;
_Rounds[round, player].Difficulty = Player[player].Difficulty;
_Rounds[round, player].Points = 0f;
_Rounds[round, player].PointsGoldenNotes = 0f;
_Rounds[round, player].PointsLineBonus = 0f;
_Rounds[round, player].Medley = false;
_Rounds[round, player].Duet = false;
_Rounds[round, player].ShortSong = false;
_Rounds[round, player].SongFinished = false;
}
}
}
public void SetPoints(int Round, int SongID, SPlayer[] Player, bool Medley, bool Duet, bool ShortSong)
{
long DateTicks = DateTime.Now.Ticks;
for (int player = 0; player < Player.Length; player++)
{
_Rounds[Round, player].SongID = SongID;
_Rounds[Round, player].LineNr = Player[player].LineNr;
_Rounds[Round, player].Points = Player[player].Points;
_Rounds[Round, player].PointsGoldenNotes = Player[player].PointsGoldenNotes;
_Rounds[Round, player].PointsLineBonus = Player[player].PointsLineBonus;
_Rounds[Round, player].Medley = Medley;
_Rounds[Round, player].Duet = Duet;
_Rounds[Round, player].ShortSong = ShortSong;
_Rounds[Round, player].DateTicks = DateTicks;
_Rounds[Round, player].SongFinished = Player[player].SongFinished;
}
}
public int NumRounds
{
get { return _Rounds.GetLength(0); }
}
public int NumPlayer
{
get { return _Rounds.GetLength(1); }
}
public SPlayer[] GetPlayer(int Round, int numPlayer)
{
if (NumPlayer == 0)
return new SPlayer[1];
if (Round >= NumRounds)
return new SPlayer[1];
SPlayer[] player = new SPlayer[numPlayer];
for (int p = 0; p < player.Length; p++)
{
player[p].Name = _Rounds[Round, p].Name;
player[p].Points = _Rounds[Round, p].Points;
player[p].PointsGoldenNotes = _Rounds[Round, p].PointsGoldenNotes;
player[p].PointsLineBonus = _Rounds[Round, p].PointsLineBonus;
player[p].SongID = _Rounds[Round, p].SongID;
player[p].LineNr = _Rounds[Round, p].LineNr;
player[p].Difficulty = _Rounds[Round, p].Difficulty;
player[p].Medley = _Rounds[Round, p].Medley;
player[p].Duet = _Rounds[Round, p].Duet;
player[p].ShortSong = _Rounds[Round, p].ShortSong;
player[p].DateTicks = _Rounds[Round, p].DateTicks;
player[p].SongFinished = _Rounds[Round, p].SongFinished;
player[p].ProfileID = _Rounds[Round, p].ProfileID;
}
return player;
}
}
}
+285
View File
@@ -0,0 +1,285 @@
using System;
namespace VocaluxeLib.Menu
{
#region Inputs
[Flags]
public enum EModifier
{
None = 0,
Shift = 1,
Alt = 2,
Ctrl = 4
}
public enum ESender
{
Mouse,
Keyboard,
WiiMote,
Gamepad
}
#endregion Inputs
#region Fonts
public enum EAspect
{
Crop,
LetterBox,
Stretch
}
public enum EAlignment
{
Left,
Center,
Right
}
public enum EHAlignment
{
Top,
Center,
Bottom
}
public enum EStyle
{
Normal,
Italic,
Bold,
BoldItalic
}
#endregion Fonts
#region Config
public enum ERenderer
{
#if WIN
TR_CONFIG_DIRECT3D,
#endif
TR_CONFIG_OPENGL,
TR_CONFIG_SOFTWARE
}
public enum EAntiAliasingModes
{
x0 = 0,
x2 = 2,
x4 = 4,
x8 = 8,
x16 = 16,
x32 = 32
}
public enum EColorDeep
{
Bit8 = 8,
Bit16 = 16,
Bit24 = 24,
Bit32 = 32
}
public enum ETextureQuality
{
TR_CONFIG_TEXTURE_LOWEST,
TR_CONFIG_TEXTURE_LOW,
TR_CONFIG_TEXTURE_MEDIUM,
TR_CONFIG_TEXTURE_HIGH,
TR_CONFIG_TEXTURE_HIGHEST
}
public enum EOffOn
{
TR_CONFIG_OFF,
TR_CONFIG_ON
}
public enum EDebugLevel
{
// don't change the order!
TR_CONFIG_OFF, //no debug infos
TR_CONFIG_ONLY_FPS,
TR_CONFIG_LEVEL1,
TR_CONFIG_LEVEL2,
TR_CONFIG_LEVEL3,
TR_CONFIG_LEVEL_MAX //all debug infos
}
public enum EBufferSize
{
b0 = 0,
b512 = 512,
b1024 = 1024,
b1536 = 1536,
b2048 = 2048,
b2560 = 2560,
b3072 = 3072,
b3584 = 3584,
b4096 = 4096
}
public enum EPlaybackLib
{
PortAudio,
OpenAL,
Gstreamer
}
public enum EWebcamLib
{
OpenCV,
AForgeNet
}
public enum ERecordLib
{
#if WIN
DirectSound,
#endif
PortAudio
}
public enum EVideoDecoder
{
FFmpeg,
Gstreamer
}
public enum ESongMenu
{
//TR_CONFIG_LIST, //a simple list
//TR_CONFIG_DREIDEL, //as in ultrastar deluxe
TR_CONFIG_TILE_BOARD, //chessboard like
//TR_CONFIG_BOOK //for playlists
}
public enum EDuetOptions
{
All,
Duets,
NoDuets
}
public enum ESongSorting
{
TR_CONFIG_NONE,
//TR_CONFIG_RANDOM,
TR_CONFIG_FOLDER,
TR_CONFIG_ARTIST,
TR_CONFIG_ARTIST_LETTER,
TR_CONFIG_TITLE_LETTER,
TR_CONFIG_EDITION,
TR_CONFIG_GENRE,
TR_CONFIG_LANGUAGE,
TR_CONFIG_YEAR,
TR_CONFIG_DECADE
}
public enum ECoverLoading
{
TR_CONFIG_COVERLOADING_ONDEMAND,
TR_CONFIG_COVERLOADING_ATSTART,
TR_CONFIG_COVERLOADING_DYNAMIC
}
public enum EGameDifficulty
{
TR_CONFIG_EASY,
TR_CONFIG_NORMAL,
TR_CONFIG_HARD
}
public enum ETimerMode
{
TR_CONFIG_TIMERMODE_CURRENT,
TR_CONFIG_TIMERMODE_REMAINING,
TR_CONFIG_TIMERMODE_TOTAL
}
public enum ETimerLook
{
TR_CONFIG_TIMERLOOK_NORMAL,
TR_CONFIG_TIMERLOOK_EXPANDED
}
public enum EBackgroundMusicSource
{
TR_CONFIG_NO_OWN_MUSIC,
TR_CONFIG_OWN_MUSIC,
TR_CONFIG_ONLY_OWN_MUSIC
}
public enum EPlayerInfo
{
TR_CONFIG_PLAYERINFO_BOTH,
TR_CONFIG_PLAYERINFO_NAME,
TR_CONFIG_PLAYERINFO_AVATAR,
TR_CONFIG_PLAYERINFO_OFF
}
public enum EFadePlayerInfo
{
TR_CONFIG_FADEPLAYERINFO_ALL,
TR_CONFIG_FADEPLAYERINFO_INFO,
TR_CONFIG_FADEPLAYERINFO_OFF
}
public enum ELyricStyle
{
Fill,
Jump,
Slide,
Zoom
}
#endregion Config
public enum EGameState
{
Start,
Normal,
EditTheme
}
public enum EGameMode
{
TR_GAMEMODE_NORMAL,
TR_GAMEMODE_MEDLEY,
TR_GAMEMODE_DUET,
TR_GAMEMODE_SHORTSONG
}
public enum ENoteType
{
Normal,
Golden,
Freestyle
}
public enum EScreens
{
ScreenTest = 0,
ScreenLoad = 1,
ScreenMain = 2,
ScreenSong = 3,
ScreenOptions = 4,
ScreenSing = 5,
ScreenProfiles = 6,
ScreenScore = 7,
ScreenHighscore = 8,
ScreenOptionsGame = 9,
ScreenOptionsSound = 10,
ScreenOptionsRecord = 11,
ScreenOptionsVideo = 12,
ScreenOptionsLyrics = 13,
ScreenOptionsTheme = 14,
ScreenNames = 15,
ScreenCredits = 16,
ScreenParty = 17,
ScreenPartyDummy = 18,
ScreenNull = -1
}
}
-638
View File
@@ -312,642 +312,4 @@ namespace VocaluxeLib.Menu
int GetPlaylistSongCount(int PlaylistID);
CPlaylistSong GetPlaylistSong(int PlaylistID, int SongIndex);
}
[Flags]
public enum EModifier
{
None = 0,
Shift = 1,
Alt = 2,
Ctrl = 4
}
public enum ESender
{
Mouse,
Keyboard,
WiiMote,
Gamepad
}
public struct KeyEvent
{
public ESender Sender;
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public bool KeyPressed;
public bool Handled;
public Keys Key;
public Char Unicode;
public EModifier Mod;
public KeyEvent(ESender sender, bool alt, bool shift, bool ctrl, bool pressed, char unicode, Keys key)
{
Sender = sender;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
KeyPressed = pressed;
Unicode = unicode;
Key = key;
Handled = false;
Mod = EModifier.None;
if (alt)
Mod |= EModifier.Alt;
if (shift)
Mod |= EModifier.Shift;
if (ctrl)
Mod |= EModifier.Ctrl;
}
}
public struct MouseEvent
{
public ESender Sender;
public bool Handled;
public int X;
public int Y;
public bool LB; //left button click
public bool LD; //left button double click
public bool RB; //right button click
public bool MB; //middle button click
public bool LBH; //left button hold (when moving)
public bool RBH; //right button hold (when moving)
public bool MBH; //middle button hold (when moving)
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public EModifier Mod;
public int Wheel;
public MouseEvent(ESender sender, bool alt, bool shift, bool ctrl, int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
{
Sender = sender;
Handled = false;
X = x;
Y = y;
LB = lb;
LD = ld;
RB = rb;
MB = mb;
LBH = lbh;
RBH = rbh;
MBH = mbh;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
EModifier mALT = EModifier.None;
EModifier mSHIFT = EModifier.None;
EModifier mCTRL = EModifier.None;
if (alt)
mALT = EModifier.Alt;
if (shift)
mSHIFT = EModifier.Shift;
if (ctrl)
mCTRL = EModifier.Ctrl;
if (!alt && !shift && !ctrl)
Mod = EModifier.None;
else
Mod = mALT | mSHIFT | mCTRL;
Wheel = wheel;
}
}
public enum EGameState
{
Start,
Normal,
EditTheme
}
public enum EAspect
{
Crop,
LetterBox,
Stretch
}
#region Structs
public struct SColorF
{
public float R;
public float G;
public float B;
public float A;
public SColorF(float r, float g, float b, float a)
{
R = r;
G = g;
B = b;
A = a;
}
public SColorF(SColorF Color)
{
R = Color.R;
G = Color.G;
B = Color.B;
A = Color.A;
}
}
public struct SRectF
{
public float X;
public float Y;
public float W;
public float H;
public float Z;
public float Rotation; //0..360°
public SRectF(float x, float y, float w, float h, float z)
{
X = x;
Y = y;
W = w;
H = h;
Z = z;
Rotation = 0f;
}
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
}
public struct SPoint3f
{
public float X;
public float Y;
public float Z;
}
public struct SPoint3
{
public int X;
public int Y;
public int Z;
}
public struct STexture
{
public int index;
public int PBO;
public int ID;
public string TexturePath;
public float width;
public float height;
public SRectF rect;
public float w2; //power of 2 width
public float h2; //power of 2 height
public float width_ratio;
public float height_ratio;
public SColorF color;
public STexture(int Index)
{
index = Index;
PBO = 0;
ID = -1;
TexturePath = String.Empty;
width = 1f;
height = 1f;
rect = new SRectF(0f, 0f, 1f, 1f, 0f);
w2 = 2f;
h2 = 2f;
width_ratio = 0.5f;
height_ratio = 0.5f;
color = new SColorF(1f, 1f, 1f, 1f);
}
}
#endregion Structs
#region EnumsConfig
public enum ERenderer
{
#if WIN
TR_CONFIG_DIRECT3D,
#endif
TR_CONFIG_OPENGL,
TR_CONFIG_SOFTWARE
}
public enum EAntiAliasingModes
{
x0 = 0,
x2 = 2,
x4 = 4,
x8 = 8,
x16 = 16,
x32 = 32
}
public enum EColorDeep
{
Bit8 = 8,
Bit16 = 16,
Bit24 = 24,
Bit32 = 32
}
public enum ETextureQuality
{
TR_CONFIG_TEXTURE_LOWEST,
TR_CONFIG_TEXTURE_LOW,
TR_CONFIG_TEXTURE_MEDIUM,
TR_CONFIG_TEXTURE_HIGH,
TR_CONFIG_TEXTURE_HIGHEST
}
public enum EOffOn
{
TR_CONFIG_OFF,
TR_CONFIG_ON
}
public enum EDebugLevel
{
// don't change the order!
TR_CONFIG_OFF, //no debug infos
TR_CONFIG_ONLY_FPS,
TR_CONFIG_LEVEL1,
TR_CONFIG_LEVEL2,
TR_CONFIG_LEVEL3,
TR_CONFIG_LEVEL_MAX //all debug infos
}
public enum EBufferSize
{
b0 = 0,
b512 = 512,
b1024 = 1024,
b1536 = 1536,
b2048 = 2048,
b2560 = 2560,
b3072 = 3072,
b3584 = 3584,
b4096 = 4096
}
public enum EPlaybackLib
{
PortAudio,
OpenAL,
Gstreamer
}
public enum EWebcamLib
{
OpenCV,
AForgeNet
}
public enum ERecordLib
{
#if WIN
DirectSound,
#endif
PortAudio
}
public enum EVideoDecoder
{
FFmpeg,
Gstreamer
}
public enum ESongMenu
{
//TR_CONFIG_LIST, //a simple list
//TR_CONFIG_DREIDEL, //as in ultrastar deluxe
TR_CONFIG_TILE_BOARD, //chessboard like
//TR_CONFIG_BOOK //for playlists
}
public enum EDuetOptions
{
All,
Duets,
NoDuets
}
public enum ESongSorting
{
TR_CONFIG_NONE,
//TR_CONFIG_RANDOM,
TR_CONFIG_FOLDER,
TR_CONFIG_ARTIST,
TR_CONFIG_ARTIST_LETTER,
TR_CONFIG_TITLE_LETTER,
TR_CONFIG_EDITION,
TR_CONFIG_GENRE,
TR_CONFIG_LANGUAGE,
TR_CONFIG_YEAR,
TR_CONFIG_DECADE
}
public enum ECoverLoading
{
TR_CONFIG_COVERLOADING_ONDEMAND,
TR_CONFIG_COVERLOADING_ATSTART,
TR_CONFIG_COVERLOADING_DYNAMIC
}
public enum EGameDifficulty
{
TR_CONFIG_EASY,
TR_CONFIG_NORMAL,
TR_CONFIG_HARD
}
public enum ETimerMode
{
TR_CONFIG_TIMERMODE_CURRENT,
TR_CONFIG_TIMERMODE_REMAINING,
TR_CONFIG_TIMERMODE_TOTAL
}
public enum ETimerLook
{
TR_CONFIG_TIMERLOOK_NORMAL,
TR_CONFIG_TIMERLOOK_EXPANDED
}
public enum EBackgroundMusicSource
{
TR_CONFIG_NO_OWN_MUSIC,
TR_CONFIG_OWN_MUSIC,
TR_CONFIG_ONLY_OWN_MUSIC
}
public enum EPlayerInfo
{
TR_CONFIG_PLAYERINFO_BOTH,
TR_CONFIG_PLAYERINFO_NAME,
TR_CONFIG_PLAYERINFO_AVATAR,
TR_CONFIG_PLAYERINFO_OFF
}
public enum EFadePlayerInfo
{
TR_CONFIG_FADEPLAYERINFO_ALL,
TR_CONFIG_FADEPLAYERINFO_INFO,
TR_CONFIG_FADEPLAYERINFO_OFF
}
public enum ELyricStyle
{
Fill,
Jump,
Slide,
Zoom
}
#endregion EnumsConfig
public enum EAlignment
{
Left,
Center,
Right
}
public enum EHAlignment
{
Top,
Center,
Bottom
}
public enum EStyle
{
Normal,
Italic,
Bold,
BoldItalic
}
public enum ENoteType
{
Normal,
Golden,
Freestyle
}
public struct SProfile
{
public string PlayerName;
public string ProfileFile;
public EGameDifficulty Difficulty;
public SAvatar Avatar;
public EOffOn GuestProfile;
public EOffOn Active;
}
public struct SAvatar
{
public string FileName;
public STexture Texture;
public SAvatar(int dummy)
{
FileName = String.Empty;
Texture = new STexture(-1);
}
}
public struct SPlayer
{
public int ProfileID;
public string Name;
public EGameDifficulty Difficulty;
public double Points;
public double PointsLineBonus;
public double PointsGoldenNotes;
public int NoteDiff;
public int LineNr;
public List<CLine> SingLine;
public int CurrentLine;
public int CurrentNote;
public int SongID;
public bool Medley;
public bool Duet;
public bool ShortSong;
public long DateTicks;
public bool SongFinished;
}
public class CPoints
{
private readonly SPlayer[,] _Rounds;
public CPoints(int NumRounds, SPlayer[] Players)
{
_Rounds = new SPlayer[NumRounds,Players.Length];
for (int round = 0; round < NumRounds; round++)
{
for (int player = 0; player < Players.Length; player++)
{
_Rounds[round, player].ProfileID = Players[player].ProfileID;
_Rounds[round, player].Name = Players[player].Name;
_Rounds[round, player].Difficulty = Players[player].Difficulty;
_Rounds[round, player].Points = 0f;
_Rounds[round, player].PointsGoldenNotes = 0f;
_Rounds[round, player].PointsLineBonus = 0f;
_Rounds[round, player].Medley = false;
_Rounds[round, player].Duet = false;
_Rounds[round, player].ShortSong = false;
_Rounds[round, player].SongFinished = false;
}
}
}
public void SetPoints(int Round, int SongID, SPlayer[] Players, bool Medley, bool Duet, bool ShortSong)
{
long DateTicks = DateTime.Now.Ticks;
for (int player = 0; player < Players.Length; player++)
{
_Rounds[Round, player].SongID = SongID;
_Rounds[Round, player].LineNr = Players[player].LineNr;
_Rounds[Round, player].Points = Players[player].Points;
_Rounds[Round, player].PointsGoldenNotes = Players[player].PointsGoldenNotes;
_Rounds[Round, player].PointsLineBonus = Players[player].PointsLineBonus;
_Rounds[Round, player].Medley = Medley;
_Rounds[Round, player].Duet = Duet;
_Rounds[Round, player].ShortSong = ShortSong;
_Rounds[Round, player].DateTicks = DateTicks;
_Rounds[Round, player].SongFinished = Players[player].SongFinished;
}
}
public int NumRounds
{
get { return _Rounds.GetLength(0); }
}
public int NumPlayer
{
get { return _Rounds.GetLength(1); }
}
public SPlayer[] GetPlayer(int Round, int numPlayer)
{
if (NumPlayer == 0)
return new SPlayer[1];
if (Round >= NumRounds)
return new SPlayer[1];
SPlayer[] player = new SPlayer[numPlayer];
for (int p = 0; p < player.Length; p++)
{
player[p].Name = _Rounds[Round, p].Name;
player[p].Points = _Rounds[Round, p].Points;
player[p].PointsGoldenNotes = _Rounds[Round, p].PointsGoldenNotes;
player[p].PointsLineBonus = _Rounds[Round, p].PointsLineBonus;
player[p].SongID = _Rounds[Round, p].SongID;
player[p].LineNr = _Rounds[Round, p].LineNr;
player[p].Difficulty = _Rounds[Round, p].Difficulty;
player[p].Medley = _Rounds[Round, p].Medley;
player[p].Duet = _Rounds[Round, p].Duet;
player[p].ShortSong = _Rounds[Round, p].ShortSong;
player[p].DateTicks = _Rounds[Round, p].DateTicks;
player[p].SongFinished = _Rounds[Round, p].SongFinished;
player[p].ProfileID = _Rounds[Round, p].ProfileID;
}
return player;
}
}
public struct SScores
{
public string Name;
public int Score;
public string Date;
public EGameDifficulty Difficulty;
public int LineNr;
public int ID;
}
public enum EGameMode
{
TR_GAMEMODE_NORMAL,
TR_GAMEMODE_MEDLEY,
TR_GAMEMODE_DUET,
TR_GAMEMODE_SHORTSONG
}
public struct SPartyModeInfos
{
public int PartyModeID;
public string Name;
public string Description;
public string TargetAudience;
public int MaxPlayers;
public int MinPlayers;
public int MaxTeams;
public int MinTeams;
public string Author;
public bool Playable;
public int VersionMajor;
public int VersionMinor;
}
public enum EScreens
{
ScreenTest = 0,
ScreenLoad = 1,
ScreenMain = 2,
ScreenSong = 3,
ScreenOptions = 4,
ScreenSing = 5,
ScreenProfiles = 6,
ScreenScore = 7,
ScreenHighscore = 8,
ScreenOptionsGame = 9,
ScreenOptionsSound = 10,
ScreenOptionsRecord = 11,
ScreenOptionsVideo = 12,
ScreenOptionsLyrics = 13,
ScreenOptionsTheme = 14,
ScreenNames = 15,
ScreenCredits = 16,
ScreenParty = 17,
ScreenPartyDummy = 18,
ScreenNull = -1
}
}
+1 -1
View File
@@ -1000,7 +1000,7 @@ namespace VocaluxeLib.Menu.SongMenu
CLines lines = Notes.GetLines(0);
//Calculate length of singing
int stop = (lines.Line[lines.Line.Length - 1].LastNoteBeat - lines.Line[0].FirstNoteBeat) / 2 + lines.Line[0].StartBeat;
int stop = (lines.Line[lines.Line.Length - 1].LastNoteBeat - lines.Line[0].FirstNote.StartBeat) / 2 + lines.Line[0].FirstNote.StartBeat;
//Check if stop is in series
for (int i = 0; i < series.Count; i++)
+292
View File
@@ -0,0 +1,292 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using VocaluxeLib.Menu.SingNotes;
namespace VocaluxeLib.Menu
{
#region Drawing
public struct SColorF
{
public float R;
public float G;
public float B;
public float A;
public SColorF(float r, float g, float b, float a)
{
R = r;
G = g;
B = b;
A = a;
}
public SColorF(SColorF Color)
{
R = Color.R;
G = Color.G;
B = Color.B;
A = Color.A;
}
}
public struct SRectF
{
public float X;
public float Y;
public float W;
public float H;
public float Z;
public float Rotation; //0..360°
public SRectF(float x, float y, float w, float h, float z)
{
X = x;
Y = y;
W = w;
H = h;
Z = z;
Rotation = 0f;
}
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
}
public struct SPoint3f
{
public float X;
public float Y;
public float Z;
}
public struct SPoint3
{
public int X;
public int Y;
public int Z;
}
public struct STexture
{
public int index;
public int PBO;
public int ID;
public string TexturePath;
public float width;
public float height;
public SRectF rect;
public float w2; //power of 2 width
public float h2; //power of 2 height
public float width_ratio;
public float height_ratio;
public SColorF color;
public STexture(int Index)
{
index = Index;
PBO = 0;
ID = -1;
TexturePath = String.Empty;
width = 1f;
height = 1f;
rect = new SRectF(0f, 0f, 1f, 1f, 0f);
w2 = 2f;
h2 = 2f;
width_ratio = 0.5f;
height_ratio = 0.5f;
color = new SColorF(1f, 1f, 1f, 1f);
}
}
#endregion Drawing
#region Inputs
public struct KeyEvent
{
public ESender Sender;
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public bool KeyPressed;
public bool Handled;
public Keys Key;
public Char Unicode;
public EModifier Mod;
public KeyEvent(ESender sender, bool alt, bool shift, bool ctrl, bool pressed, char unicode, Keys key)
{
Sender = sender;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
KeyPressed = pressed;
Unicode = unicode;
Key = key;
Handled = false;
Mod = EModifier.None;
if (alt)
Mod |= EModifier.Alt;
if (shift)
Mod |= EModifier.Shift;
if (ctrl)
Mod |= EModifier.Ctrl;
}
}
public struct MouseEvent
{
public ESender Sender;
public bool Handled;
public int X;
public int Y;
public bool LB; //left button click
public bool LD; //left button double click
public bool RB; //right button click
public bool MB; //middle button click
public bool LBH; //left button hold (when moving)
public bool RBH; //right button hold (when moving)
public bool MBH; //middle button hold (when moving)
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public EModifier Mod;
public int Wheel;
public MouseEvent(ESender sender, bool alt, bool shift, bool ctrl, int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
{
Sender = sender;
Handled = false;
X = x;
Y = y;
LB = lb;
LD = ld;
RB = rb;
MB = mb;
LBH = lbh;
RBH = rbh;
MBH = mbh;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
EModifier mALT = EModifier.None;
EModifier mSHIFT = EModifier.None;
EModifier mCTRL = EModifier.None;
if (alt)
mALT = EModifier.Alt;
if (shift)
mSHIFT = EModifier.Shift;
if (ctrl)
mCTRL = EModifier.Ctrl;
if (!alt && !shift && !ctrl)
Mod = EModifier.None;
else
Mod = mALT | mSHIFT | mCTRL;
Wheel = wheel;
}
}
#endregion Inputs
#region Profiles
public struct SProfile
{
public string PlayerName;
public string ProfileFile;
public EGameDifficulty Difficulty;
public SAvatar Avatar;
public EOffOn GuestProfile;
public EOffOn Active;
}
public struct SAvatar
{
public string FileName;
public STexture Texture;
public SAvatar(int dummy)
{
FileName = String.Empty;
Texture = new STexture(-1);
}
}
#endregion Profiles
#region Game
public struct SPlayer
{
public int ProfileID;
public string Name;
public EGameDifficulty Difficulty;
public double Points;
public double PointsLineBonus;
public double PointsGoldenNotes;
public int NoteDiff;
public int LineNr;
public List<CLine> SingLine;
public int CurrentLine;
public int CurrentNote;
public int SongID;
public bool Medley;
public bool Duet;
public bool ShortSong;
public long DateTicks;
public bool SongFinished;
}
public struct SScores
{
public string Name;
public int Score;
public string Date;
public EGameDifficulty Difficulty;
public int LineNr;
public int ID;
}
public struct SPartyModeInfos
{
public int PartyModeID;
public string Name;
public string Description;
public string TargetAudience;
public int MaxPlayers;
public int MinPlayers;
public int MaxTeams;
public int MinTeams;
public string Author;
public bool Playable;
public int VersionMajor;
public int VersionMinor;
}
#endregion Game
}
+5 -2
View File
@@ -10,9 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib</RootNamespace>
<AssemblyName>VocaluxeLib</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -126,11 +126,13 @@
<Compile Include="Menu\COrderedDictionaryLite.cs" />
<Compile Include="Menu\CParticle.cs" />
<Compile Include="Menu\CPlaylist.cs" />
<Compile Include="Menu\CPoints.cs" />
<Compile Include="Menu\CSelectSlide.cs" />
<Compile Include="Menu\CStatic.cs" />
<Compile Include="Menu\CText.cs" />
<Compile Include="Menu\CScreenSetting.cs" />
<Compile Include="Menu\CXMLReader.cs" />
<Compile Include="Menu\Enums.cs" />
<Compile Include="Menu\IMenu.cs" />
<Compile Include="Menu\IMenuElement.cs" />
<Compile Include="Menu\SingNotes\CNotes.cs" />
@@ -145,6 +147,7 @@
<Compile Include="Menu\SongMenu\CSongMenuList.cs" />
<Compile Include="Menu\SongMenu\CSongMenuTileBoard.cs" />
<Compile Include="Menu\SongMenu\ISongMenu.cs" />
<Compile Include="Menu\Structs.cs" />
<Compile Include="PartyModes\CPartyMode.cs" />
<Compile Include="PartyModes\CPartyModeNone.cs" />
<Compile Include="PartyModes\CScreenPartyDummy.cs" />