Skip to content

Commit

Permalink
cleanup to pass args as file
Browse files Browse the repository at this point in the history
  • Loading branch information
hij1nx committed Feb 12, 2011
1 parent 1bcda8b commit 93cc279
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Irrkl: ObjectWrap
s_ct->InstanceTemplate()->SetInternalFieldCount(1);
s_ct->SetClassName(String::NewSymbol("Irrkl"));

NODE_SET_PROTOTYPE_METHOD(s_ct, "bell", Bell);
NODE_SET_PROTOTYPE_METHOD(s_ct, "play", Play);

target->Set(String::NewSymbol("Irrkl"),
s_ct->GetFunction());
Expand All @@ -70,15 +70,15 @@ class Irrkl: ObjectWrap
return args.This();
}

static Handle<Value> Bell(const Arguments& args)
static Handle<Value> Play(const Arguments& args)
{
HandleScope scope;
Irrkl* hw = ObjectWrap::Unwrap<Irrkl>(args.This());
hw->m_count++;
ISoundEngine* engine = createIrrKlangDevice();
//if (!engine)
// return 0; // error starting up the engine
engine->play2D("../../media/bell.wav", true);
engine->play2D(args[0], true);
engine->drop(); // delete engine
return scope.Close(engine);
}
Expand Down

0 comments on commit 93cc279

Please sign in to comment.