写完排行榜了

This commit is contained in:
lichx
2024-04-18 08:38:59 +08:00
parent 3e81b973e9
commit 7cf048fd7c
113 changed files with 2589 additions and 200 deletions
+1 -7
View File
@@ -42,7 +42,7 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
this.file_name = file_name;
this.volume = volume;
this.finished = finished;
file_name = file_name.Split('.').First().Replace(" ", "_").Replace("-", "_");
file_name = file_name.Split('.').First().Replace(" ", "_").Replace("-", "_").Replace(",","_");
source_obj = Etcs.audio_Res_Manager.Get_Audio_Resources(file_name);
sound = new MemoryStream(source_obj);
ms = new MemoryStream(StreamToBytes(sound));
@@ -67,12 +67,6 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
finished?.Invoke(file_name,this);
Dispose();
}
~AudioPlayer()
{
Dispose();
}
public void Dispose()
{
shuting_down = true;
@@ -11,12 +11,8 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
public class Info_Audio_processer
{
Etcs.break_music soundScape_version = Etcs.break_music.breakA;
public int soundScape_volume { get; set; } = 90;
string last_break_soundScape = "";
Random random = new Random();
class Info_file_processer
{ }
internal void set_SoundScape_version(Etcs.break_music version) => soundScape_version = version;
internal void play_random_break_soundScape()
{
@@ -26,7 +22,7 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
{
audioPlayer.Dispose();
}
AudioPlayer audioPlayer = new AudioPlayer(get_random_break_soundScape(), soundScape_volume,finished);
AudioPlayer audioPlayer = new AudioPlayer(get_random_break_soundScape(), Etcs.Info_Volume,finished);
audioPlayer.resume_song();
//object obj = Settings.res_Manager.GetObject(get_random_break_soundScape(), Settings.res_Culture)!;
//var infoOutputDevice = new WaveOutEvent();
@@ -21,6 +21,14 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
}
public void pause_song()=> audioPlayer?.pause_song();
public void resume_song()=> audioPlayer?.resume_song();
public string get_last_song()
{
next_song+=audioFiles.Count-2;
next_song %= audioFiles.Count;
string name = audioFiles[next_song];
next_song++;
return name;
}
public string get_next_song()
{
string name = audioFiles[next_song];
@@ -40,9 +48,11 @@ namespace CDSAE3_Lian_Lian_Kan.Sound
if (result.Count == 0)
throw new Exception("no such album");
audioFiles = result.First().Value;
Etcs.setting.SetAlbum(result.First().Key);
}
public void set_song(string s)
{
Etcs.setting.SetSongInfo(s);
audioPlayer?.Dispose();
try
{