Skip to content

Instantly share code, notes, and snippets.

View rlxone's full-sized avatar
🏠
Working from home

Dmitry Meduho rlxone

🏠
Working from home
View GitHub Profile
@rlxone
rlxone / CoreAudio.swift
Last active October 9, 2023 19:46
CoreAudio output device useful methods in Swift 4
/*
static func getOutputDevices() -> [AudioDeviceID: String]?
static func isOutputDevice(deviceID: AudioDeviceID) -> Bool
static func getAggregateDeviceSubDeviceList(deviceID: AudioDeviceID) -> [AudioDeviceID]
static func isAggregateDevice(deviceID: AudioDeviceID) -> Bool
static func setDeviceVolume(deviceID: AudioDeviceID, leftChannelLevel: Float, rightChannelLevel: Float)
static func setOutputDevice(newDeviceID: AudioDeviceID)
static func getDeviceVolume(deviceID: AudioDeviceID) -> [Float]
static func getDefaultOutputDevice() -> AudioDeviceID
*/
@rlxone
rlxone / playground.swift
Last active April 2, 2019 16:48
iOS cards with cornerRadius and shadow in UICollectionView [Swift 4 Playground]
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
class CardView: UICollectionViewCell {
override init(frame: CGRect) {
super.init(frame: frame)
setupView()