Skip to content

Commit

Permalink
register new sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvida89 committed Apr 23, 2019
1 parent a50d465 commit 6042bf0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified src/.DS_Store
Binary file not shown.
64 changes: 29 additions & 35 deletions src/ios/CDVEcho.mm
Original file line number Diff line number Diff line change
Expand Up @@ -55,46 +55,40 @@ All sound samples must be in same format (sample rate, sample depth, stereo/mono
//the following block executes sound_define calls once
static dispatch_once_t once_token;
dispatch_once (&once_token, ^{
NSURL* s = [[NSBundle mainBundle] URLForResource:@"MoreCowbell" withExtension:@"caf"];
sound_define(s, 'H', 1);
sound_define(s, 'L', 0.3);
sound_define(s, 'S', 0.1);
sound_define(s, 'N', 0);
sound_define(s, 'X', 0);
sound_define(s, 'M', 0.5);

NSURL* s1 = [[NSBundle mainBundle] URLForResource:@"MoreCowbell" withExtension:@"caf"];
// NSURL* s = [[NSBundle mainBundle] URLForResource:@"Cowbell" withExtension:@"caf"];
// sound_define(s, 'H', 1);
// sound_define(s, 'L', 0.3);
// sound_define(s, 'S', 0.1);
// sound_define(s, 'N', 0);
// sound_define(s, 'X', 0);
// sound_define(s, 'M', 0.5);

NSURL* s1 = [[NSBundle mainBundle] URLForResource:@"Cowbell" withExtension:@"caf"];
sound_define(s1, 'a', 1);
sound_define(s1, 'b', 0.5);
sound_define(s1, 'c', 0.3);
sound_define(s1, 'd', 0.1);

// sound_define(s1, 'N', 0);
// sound_define(s1, 'X', 0);

// NSURL* s2 = [[NSBundle mainBundle] URLForResource:@"Cowbell" withExtension:@"caf"];
// sound_define(s2, 'e', 1);
// sound_define(s2, 'f', 0.5);
// sound_define(s2, 'g', 0.3);
// sound_define(s2, 'h', 0.1);

// NSURL* s3 = [[NSBundle mainBundle] URLForResource:@"Woodblock-High" withExtension:@"caf"];
// sound_define(s3, 'i', 1);
// sound_define(s3, 'j', 0.5);
// sound_define(s3, 'k', 0.3);
// sound_define(s3, 'l', 0.1);

// NSURL* s4 = [[NSBundle mainBundle] URLForResource:@"Woodblock-Low" withExtension:@"caf"];
// sound_define(s4, 'm', 1);
// sound_define(s4, 'n', 0.5);
// sound_define(s4, 'o', 0.3);
// sound_define(s4, 'p', 0.1);

// NSURL* s5 = [[NSBundle mainBundle] URLForResource:@"Woodblock-Mid" withExtension:@"caf"];
// sound_define(s5, 'q', 1);
// sound_define(s5, 'r', 0.5);
// sound_define(s5, 's', 0.3);
// sound_define(s5, 't', 0.1);
sound_define(s1, 'N', 0);
sound_define(s1, 'X', 0);

NSURL* s2 = [[NSBundle mainBundle] URLForResource:@"Woodblock-High" withExtension:@"caf"];
sound_define(s2, 'e', 1);
sound_define(s2, 'f', 0.5);
sound_define(s2, 'g', 0.3);
sound_define(s2, 'h', 0.1);

NSURL* s3 = [[NSBundle mainBundle] URLForResource:@"Woodblock-Low" withExtension:@"caf"];
sound_define(s3, 'i', 1);
sound_define(s3, 'j', 0.5);
sound_define(s3, 'k', 0.3);
sound_define(s3, 'l', 0.1);

NSURL* s4 = [[NSBundle mainBundle] URLForResource:@"Woodblock-Mid" withExtension:@"caf"];
sound_define(s4, 'm', 1);
sound_define(s4, 'n', 0.5);
sound_define(s4, 'o', 0.3);
sound_define(s4, 'p', 0.1);

});

Expand Down

0 comments on commit 6042bf0

Please sign in to comment.