This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL2/SDL.h> | |
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav" | |
// prototype for our audio callback | |
// see the implementation for more information | |
void my_audio_callback(void *userdata, Uint8 *stream, int len); | |
// variable declarations | |
static Uint8 *audio_pos; // global pointer to the audio buffer to be played |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
import os | |
# We need to import the relvant object definitions from PyObjC | |
from AppKit import * | |
from PyObjCTools import AppHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Banner-style (default) | |
from Foundation import NSUserNotification, NSUserNotificationCenter | |
def notify(title, subtitle, text): | |
notification = NSUserNotification.alloc().init() | |
notification.setTitle_(str(title)) | |
notification.setSubtitle_(str(subtitle)) | |
notification.setInformativeText_(str(text)) | |
notification.setSoundName_("NSUserNotificationDefaultSoundName") | |
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
## | |
# ByteScramble | |
# | |
# Copyright 2015 Anders K. Madsen <[email protected]> | |
# Licence: MIT <https://opensource.org/licenses/MIT> | |
# | |
# Description: | |
# ------------ |