Skip to content

Instantly share code, notes, and snippets.

@saivert
Created January 13, 2023 14:18
Show Gist options
  • Save saivert/ae2b0ae7654e7a103489360b198690ff to your computer and use it in GitHub Desktop.
Save saivert/ae2b0ae7654e7a103489360b198690ff to your computer and use it in GitHub Desktop.
var inputplf = DB_decoder_t(
plugin: plug,
open: {(hints: UInt32) -> UnsafeMutablePointer<DB_fileinfo_t>? in
let ptr: UnsafeMutablePointer<fileinfo> = UnsafeMutablePointer<fileinfo>.allocate(capacity: 1)
ptr.initialize(repeating: fileinfo(dbfileinfo: DB_fileinfo_t(), frequency: 440), count: 1)
return UnsafeMutablePointer<DB_fileinfo_t>(OpaquePointer(ptr))
},
init: {(info: UnsafeMutablePointer<DB_fileinfo_t>?, it: UnsafeMutablePointer<DB_playItem_t>?) -> Int32 in
0
},
free: {(a: UnsafeMutablePointer<DB_fileinfo_t>?) -> Void in
},
read: {(a: UnsafeMutablePointer<DB_fileinfo_t>?, b: UnsafeMutablePointer<CChar>?, Int32) -> Int32 in
0
},
seek: {(info: UnsafeMutablePointer<DB_fileinfo_t>?, time: Float) -> Int32 in
0
},
seek_sample: {(info: UnsafeMutablePointer<DB_fileinfo_t>?, sample: Int32) -> Int32 in
0
},
insert: {(plt: UnsafeMutablePointer<ddb_playlist_t>?, after: UnsafeMutablePointer<DB_playItem_t>?, fname: UnsafePointer<CChar>?) -> UnsafeMutablePointer<DB_playItem_t>? in
nil
},
numvoices: nil,
mutevoice: nil,
read_metadata: {(it: UnsafeMutablePointer<DB_playItem_t>?) -> Int32 in
0
},
write_metadata: {(it: UnsafeMutablePointer<DB_playItem_t>?) -> Int32 in
0
},
exts: nil,
prefixes: nil,
open2: {(hints: UInt32, it: UnsafeMutablePointer<DB_playItem_t>?) -> UnsafeMutablePointer<DB_fileinfo_t>? in
nil
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment