-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBassAudioEngine.cs
More file actions
72 lines (60 loc) · 1.77 KB
/
BassAudioEngine.cs
File metadata and controls
72 lines (60 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using RTJuke.Core.Audio;
using RTJuke.Core.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RTJuke.Core.Plugins.Communication;
using System.Globalization;
using ManagedBass;
namespace RTJuke.Audio.LibManagedBass
{
public class BassAudioEngine : IAudioEngine
{
public string HumanFriendlySettingsText => "";
public void Start()
{
// init BASS
LogService.Debug("Initializing ManagedBASS AudioEngine");
LogService.Info(String.Format("Using BASS version {0}", Bass.Version.ToString()));
if (!Bass.Init(-1, 44100, DeviceInitFlags.Default, IntPtr.Zero))
{
LogService.Critical("Failed to init BASS Audio Engine: " + Enum.GetName(typeof(ManagedBass.Errors), Bass.LastError));
throw new Exception("Failed to init BASS Audio Engine:" + Enum.GetName(typeof(ManagedBass.Errors), Bass.LastError));
}
}
public void Shutdown()
{
Bass.Free();
}
public IAudioFile GetAudioFile(string filename)
{
return new BassAudioFile(filename);
}
public void Init(IMessageBus messageBus)
{
// --
}
public void SetLocalization(CultureInfo cultureInfo)
{
// --
}
public bool Configure()
{
return true;
}
public bool CanBeConfigured()
{
return false;
}
public string GetSettings()
{
return "";
}
public bool SetSettings(string settingsStr)
{
return true;
}
}
}