Ambient Sound? (DP SDL: TOTAL CHANNELS == MAX CHANNELS)

Discuss anything not covered by any of the other categories.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Ambient Sound? (DP SDL: TOTAL CHANNELS == MAX CHANNELS)

Post by Baker »

I get TOTAL CHANNELS == MAX CHANNELS issues with Ambient sounds only with DarkPlaces-SDL.exe and not DarkPlaces.exe with OpenQuartz (2005 version from qarchive) and often when doing experiments with replacing the ambient sounds.

I haven't checked to see if all the OpenQuartz ambient sounds are looped.

Does anyone know the proper sound specifications for ambient sounds?

The OpenQuartz ambient sounds are 32 bit mono 11025 Hz with a bitrate of 88kbps. That seems to be the same thing that the original Quake sounds use. Again, I haven't checked to see if they are looped, but a believe they are because I do not recall getting "Sound Not Looped" issues in other engines.

I've been told the DarkPlaces SDL is better with sound than the standard DarkPlaces and prefer using the SDL build.
dayfive
Posts: 77
Joined: Fri Nov 10, 2006 9:48 pm

Re: Ambient Sound? (DP SDL: TOTAL CHANNELS == MAX CHANNELS)

Post by dayfive »

Baker wrote:I get TOTAL CHANNELS == MAX CHANNELS issues with Ambient sounds
Does anyone know the proper sound specifications for ambient sounds?
11025 Hz Sampling Rate
8 bit dynamic range (Unsigned 8 bit PCM)
Linear PCM (Microsoft WAV)
Mono


There's no "bitrate" because it's not compressed audio or more specifically Quake does not use the psychoacoustic optimization performed using MP3.

For "looping" ambient sounds in Quake use CoolEdit Pro 1.51. The only reason I use this software is because it indicates in the header of each of the stock audio files that this is what the id team used in 1995-96. For example

Code: Select all

Version : libsndfile-1.0.16

========================================
File : comp1.wav
Length : 62734
RIFF : 62726
WAVE
fmt  : 18
  Format        : 0x1 => WAVE_FORMAT_PCM
  Channels      : 1
  Sample Rate   : 11025
  Block Align   : 1
  Bit Width     : 8
  Bytes/sec     : 11025
data : 62480
LIST : 86
  INFO
    ICRD : 1995-12-13
    ISFT : Cool Edit v.1.51 by Syntrillium Software Corporation
cue  : 28
  Count : 1
   Cue ID : 919  Pos :   919  Chunk : data  Chk Start : 0  Blk Start : 0  Offset :     0
LIST : 70
  adtl
    ltxt : 20
    labl : 919 : MARK919
    note : 10
End
The way Quake implements looping is by using a Cue list which is common now that everything is done using hard disks. The cue list is a way of accessing the audio data in a non-linear way in any given file and a special advantage of the hard disk medium. This is of course opposed to a tape medium where everything is linear.

For most of the loops, it just loops the whole file, but you can make a cue list (specific sample indeces to the file) for a specific small part of the file where it will start from the beginning and then loops just a segment. This is useful when dealing with many types of complex program material. Most of the time for music type loops and such you will just want to trim the start and end of the file and loop the whole thing. You may or may not know, but the start and end point of the audio should be cut at a NULL crossing. If they are not, you will experience clicks and pops since digital audio is just instantaneous pressure values for the speaker membranes indexed at the sampling rate. Abrupt values will cause unpleasant (clicks) results.


Anyway, How to specifically do it in CoolEdit is:

1) Open the file in CoolEdit Pro 1.51
Image
2) Select all (or a section to loop) by doing CTRL + A
Image
3) Go to "Options..." menu > Cue List
4) Click "Add" and then "Done" - The Label and Descrption can be anything and do not affect the end result in any way.
Image
5) Save the file.
6) Adjust your QC to have all the precache_sound () stuff and used where appropriate.
7) Play the game!

The reason they have to be mono is because of Quake's sound spatialization. The localization of sound is done in realtime by the game engine. If you get the TOTAL_CHANNELS == MAX_CHANNELS error its because you're trying to play a stereo file.

This technique is also possible in many other types of software (other than CoolEdit), although I take it from your mention of ".exe" in your original post that you're a Windows guy.
dayfive
Posts: 77
Joined: Fri Nov 10, 2006 9:48 pm

Post by dayfive »

Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Thanks for info, I'll go thru and double check to ensure no stereo sounds are being used.

Add: That's almost a sound tutorial by itself ;) Nice!
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

DarkPlaces supports stereo sounds (as well as good ol' dosquake for that matter), so that's not your problem. I can't point out what it is though.
I was once a Quake modder
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

I discovered this 5 minutes later :D None of the sounds in question were stereo.

I don't get the problem with regular DarkPlaces, only the SDL. I may try some different total conversions out to see if they get the problem as well with the ambients out of curiosity.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

CoolEdit, incidentally, has recently become Adobe Audition. They're much the same program, but it's handy to know if you're looking into the latest version.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

Not so recently either, I think it's been so for way over a year.
I was once a Quake modder
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

Yup, last time I checked though it's still good, they hadn't had enough time to bugger it up.

I use Cool Edit Pro 2.1 which is right before Adobe bought it (the early adobe audition versions that I have seen are exactly the same, they just changed the name and the credits).

In the past I have used Cool Edit 95, which I think is what id software used in quake, and it's a very solid program, and even the trial is fully functional if you're patient.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

Sounds don't have to be 11khz or 8bit. It doesn't matter as long as it's got a looping lump. I've had looping 44khz 16bit mono ambient sounds for years.

Dunno why scar3crow posted about this on the front page, but it's not like it's critical brand new info or anything.

I used CoolEdit 1.31 which can't loop btw, so I used some loophack.bat that injects some extra bytes in a WAV file to make it loop
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

CheapAlert - its handy information for new modders, it is thorough, and it explains rather than merely instructing.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

CheapAlert wrote:Sounds don't have to be 11khz or 8bit. It doesn't matter as long as it's got a looping lump. I've had looping 44khz 16bit mono ambient sounds for years.

Dunno why scar3crow posted about this on the front page, but it's not like it's critical brand new info or anything.

I used CoolEdit 1.31 which can't loop btw, so I used some loophack.bat that injects some extra bytes in a WAV file to make it loop
SoundForge does the trick, too.
EDIT: And, as far as I remember, default parameters for sound files in Quake are 22KHz, 16 bit, mono. Most part of the original sounds are like this.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

No, almost all of the original sounds are 11 khz, some are 8 bit and some are 16 bit iirc. QTest had more 22 khz sounds but they went with 11 khz for the release.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

Sajt wrote:No, almost all of the original sounds are 11 khz, some are 8 bit and some are 16 bit iirc. QTest had more 22 khz sounds but they went with 11 khz for the release.
The Quake ogre has some 22khz sounds, and the teleporter sounds are 22khz, some people really hate the ringing teleporter sound and the ogre sight sound when using 22khz or greater playback, one of the more common complaints I've gotten about DarkPlaces in the past.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

LordHavoc wrote:
Sajt wrote:No, almost all of the original sounds are 11 khz, some are 8 bit and some are 16 bit iirc. QTest had more 22 khz sounds but they went with 11 khz for the release.
The Quake ogre has some 22khz sounds, and the teleporter sounds are 22khz, some people really hate the ringing teleporter sound and the ogre sight sound when using 22khz or greater playback, one of the more common complaints I've gotten about DarkPlaces in the past.
Actually the only non-11KHz sounds exist in retail final Quake are thunderbolt noise, rotfish, and some shub sounds.
i should not be here
Post Reply