The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Sound lag with winmm
ANTA


Joined: 16 Sep 2014
Posts: 11
1) why?
2) can i use xaudio2 driver if i never install any directX before ?
Fixed!
ANTA


Joined: 16 Sep 2014
Posts: 11
By comment out this:

/* Check the buffer size -- minimum of 1/4 second (word aligned) */
// if (this->spec.samples < (this->spec.freq / 4))
// this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;


in /SDL/src/audio/winmm/SDL_winmm.c
Sound lag with winmm
Sik


Joined: 26 Nov 2011
Posts: 905
Why does SDL demand at least 250ms? o_O

As far as I know the multimedia API always had lag though, so I would
avoid relying on it when possible (albeit somebody I know found a way
to make it lagless and claims it's quite stable, but it relies on
basically not doing something you're supposed to do - I think it's not
setting up one of the buffers, but I don't remember correctly)

In any case you probably should try to get XAudio2 working, Visual
Studio already comes with it as does MinGW-w64. I suppose you only
really need to skip it with vanilla MinGW (Code::Blocks still comes
bundled with it I believe), but in that case try to switch to
MinGW-w64 as soon as possible (SDL2 already has other issues with
vanilla MinGW, if I recall correctly related to threading).

2014-09-25 16:27 GMT-03:00, ANTA:
Quote:
By comment out this:

/* Check the buffer size -- minimum of 1/4 second (word aligned) */
// if (this->spec.samples < (this->spec.freq / 4))
// this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;


in /SDL/src/audio/winmm/SDL_winmm.c





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Sound lag with winmm
ANTA


Joined: 16 Sep 2014
Posts: 11
Sik wrote:
Why does SDL demand at least 250ms? o_O

As far as I know the multimedia API always had lag though, so I would
avoid relying on it when possible (albeit somebody I know found a way
to make it lagless and claims it's quite stable, but it relies on
basically not doing something you're supposed to do - I think it's not
setting up one of the buffers, but I don't remember correctly)

In any case you probably should try to get XAudio2 working, Visual
Studio already comes with it as does MinGW-w64. I suppose you only
really need to skip it with vanilla MinGW (Code::Blocks still comes
bundled with it I believe), but in that case try to switch to
MinGW-w64 as soon as possible (SDL2 already has other issues with
vanilla MinGW, if I recall correctly related to threading).

2014-09-25 16:27 GMT-03:00, ANTA:
Quote:
By comment out this:

/* Check the buffer size -- minimum of 1/4 second (word aligned) */
// if (this->spec.samples < (this->spec.freq / 4))
// this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;


in /SDL/src/audio/winmm/SDL_winmm.c



hate directX

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Sound lag with winmm
ANTA


Joined: 16 Sep 2014
Posts: 11
Sik wrote:
Why does SDL demand at least 250ms? o_O

As far as I know the multimedia API always had lag though, so I would
avoid relying on it when possible (albeit somebody I know found a way
to make it lagless and claims it's quite stable, but it relies on
basically not doing something you're supposed to do - I think it's not
setting up one of the buffers, but I don't remember correctly)

In any case you probably should try to get XAudio2 working, Visual
Studio already comes with it as does MinGW-w64. I suppose you only
really need to skip it with vanilla MinGW (Code::Blocks still comes
bundled with it I believe), but in that case try to switch to
MinGW-w64 as soon as possible (SDL2 already has other issues with
vanilla MinGW, if I recall correctly related to threading).

2014-09-25 16:27 GMT-03:00, ANTA:
Quote:
By comment out this:

/* Check the buffer size -- minimum of 1/4 second (word aligned) */
// if (this->spec.samples < (this->spec.freq / 4))
// this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;


in /SDL/src/audio/winmm/SDL_winmm.c





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Sound lag with winmm
ANTA


Joined: 16 Sep 2014
Posts: 11
hate directX