<commit_before>About
=====

Finch is a dead-simple OpenAL-based sound effect player for iPhone. The
reasons for writing Finch instead of sticking with Apple’s `AVAudioPlayer` are
described in my [question on Stack Overflow][so]. The goals are simple: (1)
Play sound effects without much fuss, and (2) do not lag in the `play` method
as `AVAudioPlayer` does. Finch is not meant to play background music. If you
want to play background music, you can go with `AVAudioPlayer`. Finch will play
the sound effects over the background music just fine.

[so]: http://stackoverflow.com/questions/986983

Howto
=====

    #import "Finch.h"
    #import "Sound+IO.h"
    #import "RevolverSound.h"

    // Initializes Audio Session, opens OpenAL device.
    Finch *soundEngine = [[Finch alloc] init];

    // Simple sound, only one instance can play at a time.
    // If you call ‘play’ and the sound is still playing,
    // it will start from the beginning.
    Sound *click = [[Sound alloc] initWithFile:@"…/SFX/click.wav"];
    [sample play];

    // For playing multiple instances of the same sample at once.
    RevolverSound *gun = [[RevolverSound alloc]
        initWithFile:@"…/SFX/gunshot.wav" rounds:10];
    // Now I have a machinegun, ho-ho-ho.
    for (int i=1; i<=10; i++)
        [gun play];

This is alpha code, the interface will almost certainly change. That said, it
should be fairly easy to adapt to changes.

Bugs, gotchas
=============<commit_msg>Mentioned the frameworks you need to link with.<commit_after>About
=====

Finch is a dead-simple OpenAL-based sound effect player for iPhone. The
reasons for writing Finch instead of sticking with Apple’s `AVAudioPlayer` are
described in my [question on Stack Overflow][so]. The goals are simple: (1)
Play sound effects without much fuss, and (2) do not lag in the `play` method
as `AVAudioPlayer` does. Finch is not meant to play background music. If you
want to play background music, you can go with `AVAudioPlayer`. Finch will play
the sound effects over the background music just fine.

[so]: http://stackoverflow.com/questions/986983

Howto
=====

    #import "Finch.h"
    #import "Sound+IO.h"
    #import "RevolverSound.h"

    // Initializes Audio Session, opens OpenAL device.
    Finch *soundEngine = [[Finch alloc] init];

    // Simple sound, only one instance can play at a time.
    // If you call ‘play’ and the sound is still playing,
    // it will start from the beginning.
    Sound *click = [[Sound alloc] initWithFile:@"…/SFX/click.wav"];
    [sample play];

    // For playing multiple instances of the same sample at once.
    RevolverSound *gun = [[RevolverSound alloc]
        initWithFile:@"…/SFX/gunshot.wav" rounds:10];
    // Now I have a machinegun, ho-ho-ho.
    for (int i=1; i<=10; i++)
        [gun play];

(Don’t forget to link the application with `AudioToolbox` and `OpenAL`
frameworks.) This is alpha code, the interface will almost certainly change.
That said, it should be fairly easy to adapt to changes.

Bugs, gotchas
=============
{'fraction_non_alphanumeric': 0.10784960422163588, 'fraction_numerical': 0.008575197889182058, 'mean_word_length': 3.520119225037258, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '153610', 'n_tokens_mistral': 919, 'n_tokens_neox': 877, 'n_words': 398}