Homesource Forums

Homeworld Source Editing Talk
It is currently Mon Sep 25, 2017 10:52 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Nov 10, 2008 8:40 pm 
Offline

Joined: Sun Oct 26, 2008 6:15 pm
Posts: 3
Is there any reason why SDL_BUFFERSIZE in soundlow.c needs to be smaller on Linux then windows?

I had a lot of crackling when I used it as is, but when I increased it to the same as _WIN32(which is 4*FQ_SIZE), I had no crackling. FQ_SIZE is set to 256 in the codec source. It makes sense to me that the buffer should be reasonably large, is there a drawback to making it 1024 samples instead of 256?

The documentation on SDL_OpenAudio(http://libsdl.org/cgi/docwiki.cgi/SDL_OpenAudio) recommends a buffer size of at-least 512.

Code:
#ifdef _WIN32
#define SDL_BUFFERSIZE  4*FQ_SIZE
#else
#define SDL_BUFFERSIZE  FQ_SIZE
#endif

...

   // Set up wave format structure.
        ...
   aspec.samples = SDL_BUFFERSIZE;
        ...
   ... SDL_OpenAudio(&aspec, NULL) ...


Top
 Profile  
 
PostPosted: Thu Nov 13, 2008 2:52 am 
Offline
coder

Joined: Wed Oct 01, 2008 2:55 pm
Posts: 103
Location: Michigan
Ive got no objections, I tried this change and I didnt see any difference on os x.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group