forked from bitgapp/eqMac
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.swift
More file actions
62 lines (52 loc) · 2.38 KB
/
Copy pathConstants.swift
File metadata and controls
62 lines (52 loc) · 2.38 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
//
// Constants.swift
// eqMac
//
// Created by Nodeful on 12/08/2021.
// Copyright © 2021 Bitgapp. All rights reserved.
//
import Foundation
import CoreAudio.AudioServerPlugIn
import Shared
#if DEBUG
let DEBUG = true
#else
let DEBUG = false
#endif
let kAudioServerPluginTypeUUID = CFUUIDGetConstantUUIDWithBytes(nil, 0x44, 0x3A, 0xBA, 0xB8, 0xE7, 0xB3, 0x49, 0x1A, 0xB9, 0x85, 0xBE, 0xB9, 0x18, 0x70, 0x30, 0xDB)!
let kAudioServerPluginDriverInterfaceUUID = CFUUIDGetConstantUUIDWithBytes(nil, 0xEE, 0xA5, 0x77, 0x3D, 0xCC, 0x43, 0x49, 0xF1, 0x8E, 0x00, 0x8F, 0x96, 0xE7, 0xD2, 0x3B, 0x17)!
let IUnknownUUID = CFUUIDGetConstantUUIDWithBytes(kCFAllocatorSystemDefault, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4)!
let kChannelCount: UInt32 = 2
let kBitsPerChannel: UInt32 = 32
let kBytesPerChannel = kBitsPerChannel / 8
let kBytesPerFrame = kChannelCount * kBytesPerChannel
let kDataSource_NumberItems: UInt32 = 1
let kEQMDeviceDefaultName = "eqMac"
let kDeviceManufacturer = "Bitgapp Ltd"
let kDeviceUID = "EQMDevice"
let kDeviceModelUID = "EQMDeviceModelUID"
let kDefaultSampleRate: Float64 = kEQMDeviceSupportedSampleRates[0]
let kDefaultOutputVolume: Float32 = 1.0
extension HRESULT {
// Success
static let ok = HRESULT(bitPattern: 0x00000000)
static let `false` = HRESULT(bitPattern: 0x00000001)
// Error
static let unexpected = HRESULT(bitPattern: 0x8000FFFF)
static let notImplemented = HRESULT(bitPattern: 0x80000001)
static let outOfMemory = HRESULT(bitPattern: 0x80000002)
static let invalidArguments = HRESULT(bitPattern: 0x80000003)
static let noInterface = HRESULT(bitPattern: 0x80000004)
static let pointer = HRESULT(bitPattern: 0x80000005)
static let handle = HRESULT(bitPattern: 0x80000006)
static let abort = HRESULT(bitPattern: 0x80000007)
static let fail = HRESULT(bitPattern: 0x80000008)
static let accessDenied = HRESULT(bitPattern: 0x80000009)
}
let kObjectID_PlugIn: UInt32 = kAudioObjectPlugInObject
let kObjectID_Device: UInt32 = 3
let kObjectID_Stream_Input: UInt32 = 4
let kObjectID_Stream_Output: UInt32 = 8
let kObjectID_Volume_Output_Master: UInt32 = 9
let kObjectID_Mute_Output_Master: UInt32 = 10
let kObjectID_DataSource_Output_Master: UInt32 = 11