main.cpp 367 Bytes
Newer Older
daFischer's avatar
first  
daFischer committed
1 2 3 4 5

#include "main.h"

int main()
{
6 7 8 9 10 11 12 13 14
#ifdef EMSCRIPTEN
    char* memory = (char*) EM_ASM_INT({
        var x_memory = _malloc(x_filename.length+1); //TODO: Ensure x_filename is ASCII
        writeStringToMemory(x_filename, x_memory);
        return x_memory;
    },0);
    filename=memory;
    free(memory);
#endif
daFischer's avatar
first  
daFischer committed
15 16
    player=new Player(path.c_str(),filename.c_str());
}