|
pianod2
multisource multiuser scriptable networked music player
|
OS X audio player. More...
#include <config.h>#include <stdio.h>#include <string>#include <thread>#include "fundamentals.h"#include "logging.h"#include "mediaplayer.h"#include "audiooutput.h"#include "osxplayer.h"#import <AppKit/AppKit.h>#import <AVFoundation/AVFoundation.h>#import <Cocoa/Cocoa.h>
Classes | |
| class | PianodAppDelegate |
| class | PlayerHelper |
| Catch notifications that the player is ready or has completed. More... | |
| class | Audio::AVFoundationPlayer |
| Base class for OS X's AVFoundation audio player. More... | |
Namespaces | |
| Audio | |
| Classes dealing with audio output drivers and decoding/playing audio files. | |
Functions | |
| void | wrapInNSApplication (void real_application(void)) |
| The AVAudioPlayer works great, until end of song when it won't tell us that it's done. More... | |
| Media::Player * | Audio::getAVFoundationPlayer (const AudioSettings &AudioSettings, const std::string &media_url, float initial_audio_gain) |
| Old-style C interface to provide bridge from C++ to Objective-C compiled code. More... | |
Variables | |
| static std::thread * | thread = nullptr |
| static void(* | real_app )(void) |
| AVPlayerItem * | play_item |
| AVPlayer * | play |
OS X audio player.
Play media files on OS X using AVFoundation framework.
| void wrapInNSApplication | ( | void | real_applicationvoid | ) |
The AVAudioPlayer works great, until end of song when it won't tell us that it's done.
To get that, we need NSApplication and its main run loop going, and as a bonus, the fucker asserts if it's not the first thread.

| AVPlayer* play |
| AVPlayerItem* play_item |
|
static |
|
static |