Test code: 
#include "SDL/SDL.h"
#include "SDL/SDL_mixer.h"
#include "emscripten/emscripten.h"

bool gameOn = true;
SDL_Event events;
Mix_Chunk* bigShot;
Mix_Music* music;
int timer = 0;
SDL_Surface* window;

void init()
{
    SDL_Init(SDL_INIT_EVERYTHING);
    Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096);
    SDL_WM_SetCaption("DFTE", NULL);
    window = SDL_SetVideoMode(800, 600, 24, SDL_SWSURFACE);
    bigShot = Mix_LoadWAV("assets/bigShot.wav");
    music = Mix_LoadMUS("assets/flamingSoul.ogg");
    Mix_PlayMusic(music, 1);
}

void render()
{
    SDL_PollEvent(&events);

    if(SDL_GetTicks() - timer >= 2000)
    {
        Mix_PlayChannel(-1, bigShot, 0);
        timer = SDL_GetTicks();
    }

    if(events.type == SDL_QUIT)
    {
        SDL_Quit();
    }

    SDL_Flip(window);
}

int main(int argc, char** argv)
{
    init();
    emscripten_set_main_loop(render, 0, false);
}

Compiler arguments: emcc -O3 emscripten/1.35.0/projects/et/main.cpp -o 
testAudio.html --preload-file assets/bigShot.wav --preload-file 
assets/flamingSoul.ogg. Embedding the files rather than preloading them 
makes no difference.

On Monday, February 22, 2016 at 2:09:19 PM UTC-6, jj wrote:
>
> It does sound like a bug. Are you able to use the "emsdk install 
> sdk-tag-1.xx.yy-64bit" build method to install from a given tag to find 
> where it regressed?
>
> Alternatively/additionally, would you have a small test case to showcase 
> the issue?
>
> 2016-02-22 13:54 GMT+02:00 TheBlackSword <[email protected] 
> <javascript:>>:
>
>> Audio is not playing out of the left speaker when using the most recent 
>> version of Emscripten when I am compiling the SDL 1.2 SDL_mixer to play 
>> audio in Chrome and Opera. Default SDL 1.2 audio API works fine. This 
>> problem did not exist in emscripten 1.34.1 (what I was using up until now.) 
>> Possible bug? 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to