Skip to content

Instantly share code, notes, and snippets.

@iamgreaser
Created March 11, 2014 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamgreaser/9479515 to your computer and use it in GitHub Desktop.
Save iamgreaser/9479515 to your computer and use it in GitHub Desktop.
sackit + ezjack
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include "sackit.h"
#include "ezjack.h"
int main(int argc, char *argv[])
{
#ifdef STATIC_FNAME
it_module_t *module = sackit_module_load(STATIC_FNAME);
#else
it_module_t *module = sackit_module_load(argv[1]);
#endif
if(module == NULL)
return 1;
sackit_playback_t *sackit = sackit_playback_new(module, 1024, 256, MIXER_IT214FS);
ezjack_bundle_t *bun = ezjack_open("sackit", 0, 2, 2048, 44100.0f, 0);
ezjack_activate(bun);
ezjack_autoconnect(bun);
for(;;)
{
sackit_playback_update(sackit);
ezjack_write(bun, sackit->buf, sackit->buf_len*4, EZJackFormatS16Native);
}
ezjack_close(bun);
sackit_playback_free(sackit);
sackit_module_free(module);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment