audio bitrate?

Discuss anything not covered by any of the other categories.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

audio bitrate?

Post by ceriux »

Guys how do you change the audio bit rate on modified quake engines?
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

For Darkplaces per the readme:
Command line:

Sound: -sndspeed hz chooses sound output rate (supported values are 48000, 44100, 32000, 24000, 22050, 16000, 11025 (quake), 8000)

console commands:

snd_speed 48000 sound output frequency, in hertz

For any other engine I have no idea.
qbism
Posts: 1238
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Post by qbism »

It's hardwired in many engines. Classic quake was 11025. Newer engines may be double that, 44100, or 48000.
It would probably be an easy cvar, like DP.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

thanks guys i also think it's -sndspeed (which i can put into the target of the icon right?)
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

Yes just like any other command line option. I assume your talking the target variable from a windows shortcut. so it could look like this:

Code: Select all

C:/quake/darkplaces.exe -window -width 800 -game taov -sndspeed 11025 +map dm6
DP's default for this is 48000.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

it doesnt seem to be working on fitzkurok psp engine -.- i know theres a way to change it but i cant find how =(
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

Only DOS Quake has the feature to change sample rate officially (-sspeed parameter). It wasn't in the Linux, Mac or Windows ports

Very few engines restore it (sometimes as '-sndspeed' even though the standard parameter is -sspeed as defined in snd_dos.c). Not even DirectQ allows it. FitzQuake doesn't either and you wouldn't want the PSP to process high sample rate sound as it's slow with quake already.

It should be noted that Quake, with a different sample rate, will attempt to resample (nearest neighbor) all sounds to the mixer sample rate on load, so even more memory will be consumed for it on higher rates. As if the shitty ass fucking dumb shit as brains fucking lame outdated facepalming selfesteemcompensating unsupported hackedtodeath goodfornothing PSP didn't have enough memory problems already.
i should not be here
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

oh, well i found a psp engine that didnt have the problems i was having, plus downsider also compiled me a version of kurok 0.4 with quakes sample rate. both seem to preform fairly well other than kurok and proquake wont load mods with out crashing after trying to start a single player game...
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

leileilol wrote:Not even DirectQ allows it.
:?: :?: :?:

Code: Select all

	// people like higher sampling rates even though Quake's resampling is actually lower quality...
	// oh well
	int rc = COM_CheckParm ("-sspeed");

	if (rc) shm->speed = atoi (com_argv[rc + 1]);

	// qrack users expect this
	if (COM_CheckParm ("-44khz")) shm->speed = 44100;
	if (COM_CheckParm ("-22khz")) shm->speed = 22050;

	// now we need to tidy up the speed as users may provide invalid values...
	if (shm->speed <= 11025)
		shm->speed = 11025;
	else if (shm->speed <= 22050)
		shm->speed = 22050;
	else shm->speed = 44100;
:?: :?: :?:

It should be there...
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: audio bitrate?

Post by Nahuel »

jimmy88 and laurading
:roll:
"spammers spammers everywhere" :(
hi, I am nahuel, I love quake and qc.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Post by revelator »

allready reported jimmy1988 and laurading has links to illegal material so i propose her posts to be removed.
qbism
Posts: 1238
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Post by qbism »

Does directx ignore requested sample rate and do whatever it wants, anyway?
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Post by revelator »

Does directx ignore requested sample rate and do whatever it wants, anyway?
Maybe some odd stuff with the new way directx handles stuff on Win7/Vista ? actually directsound doesnt work at all on these OS's it seems. If you have the option try it out on XP if it works there i think my assumption is not far of.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

certain sound devices support only a single 48khz format anyway.

directsound has a primary buffer and a secondary buffer. its meant to be a case of writing to the secondary buffer and letting directsound migrate that to the primary one for you.
configure the primary one to set the actual hardware rate, and the secondary buffer for the datarate you want to provide.
quake has a -primarysound argument to get it to write directly to the primary buffer, but doing so is not recommended as a) only one program can access it. b) its rate+config must be a specific rate that the hardware supports.
of course, with vista onwards its all wrappers anyway.

you still need to specify the speed your audio feed is in. If your system uses a different rate because its easier to mix with other apps, then your system uses a different rate and you can't really configure that without breaking the other apps, so it doesn't really matter that much anyway, so long as the rate it picks is sufficiently high.

dosquake accepts -sspeed and that's the argument documented in techinfo.txt.
linux quakes accept -sndspeed
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: audio bitrate?

Post by Dr. Shadowborg »

Nahuel wrote:jimmy88 and laurading
:roll:
"spammers spammers everywhere" :(
reckless wrote:allready reported jimmy1988 and laurading has links to illegal material so i propose her posts to be removed.
Somebody already got jimmy, laurading has been "taken care" of. :wink: :twisted:
Post Reply