mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Revert audio changes
This commit is contained in:
parent
63c61d3e27
commit
f26a551e95
@ -33,7 +33,7 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audioManager)
|
||||
{
|
||||
Beatmap.Value = new WaveformTestBeatmap(audioManager.Track);
|
||||
Beatmap.Value = new WaveformTestBeatmap();
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audioManager)
|
||||
{
|
||||
Beatmap.Value = new WaveformTestBeatmap(audioManager.Track);
|
||||
Beatmap.Value = new WaveformTestBeatmap();
|
||||
|
||||
FillFlowContainer flow;
|
||||
Child = flow = new FillFlowContainer
|
||||
|
@ -19,12 +19,10 @@ namespace osu.Game.Tests
|
||||
{
|
||||
private readonly ZipArchiveReader reader;
|
||||
private readonly FileStream stream;
|
||||
private readonly TrackManager trackManager;
|
||||
|
||||
public WaveformTestBeatmap(TrackManager trackManager)
|
||||
public WaveformTestBeatmap()
|
||||
: base(new BeatmapInfo())
|
||||
{
|
||||
this.trackManager = trackManager;
|
||||
stream = File.OpenRead(ImportBeatmapTest.TEST_OSZ_PATH);
|
||||
reader = new ZipArchiveReader(stream);
|
||||
}
|
||||
@ -40,9 +38,9 @@ namespace osu.Game.Tests
|
||||
|
||||
protected override Texture GetBackground() => null;
|
||||
|
||||
protected override Waveform GetWaveform() => trackManager.CreateWaveform(getAudioStream());
|
||||
protected override Waveform GetWaveform() => new Waveform(getAudioStream());
|
||||
|
||||
protected override Track GetTrack() => trackManager.CreateTrack(getAudioStream());
|
||||
protected override Track GetTrack() => new TrackBass(getAudioStream());
|
||||
|
||||
private Stream getAudioStream() => reader.GetStream(reader.Filenames.First(f => f.EndsWith(".mp3")));
|
||||
private Stream getBeatmapStream() => reader.GetStream(reader.Filenames.First(f => f.EndsWith(".osu")));
|
||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Audio
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, FrameworkConfigManager config)
|
||||
{
|
||||
trackManager = new TrackManager(new OnlineStore(), audio.Callback);
|
||||
trackManager = new TrackManager(new OnlineStore());
|
||||
|
||||
this.audio = audio;
|
||||
audio.AddItem(trackManager);
|
||||
|
@ -21,7 +21,6 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
private readonly IResourceStore<byte[]> store;
|
||||
private readonly AudioManager audioManager;
|
||||
private readonly TrackManager trackManager;
|
||||
|
||||
public BeatmapManagerWorkingBeatmap(IResourceStore<byte[]> store, TextureStore textureStore, BeatmapInfo beatmapInfo, AudioManager audioManager)
|
||||
: base(beatmapInfo)
|
||||
@ -29,7 +28,6 @@ namespace osu.Game.Beatmaps
|
||||
this.store = store;
|
||||
this.textureStore = textureStore;
|
||||
this.audioManager = audioManager;
|
||||
trackManager = audioManager.Track;
|
||||
}
|
||||
|
||||
protected override IBeatmap GetBeatmap()
|
||||
@ -71,7 +69,7 @@ namespace osu.Game.Beatmaps
|
||||
try
|
||||
{
|
||||
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
|
||||
return trackData == null ? null : trackManager.CreateTrack(trackData);
|
||||
return trackData == null ? null : new TrackBass(trackData);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -92,7 +90,7 @@ namespace osu.Game.Beatmaps
|
||||
try
|
||||
{
|
||||
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
|
||||
return trackData == null ? null : trackManager.CreateWaveform(trackData);
|
||||
return trackData == null ? null : new Waveform(trackData);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user