Looping sounds?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
RaptorX
Posts: 71
Joined: Fri May 30, 2008 10:36 am
Location: hell

Looping sounds?

Post by RaptorX »

I put in a couple sounds and when they play they loop even when i want them to stop.
I need help on this one. It's really annoying. :x
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Looping sounds?

Post by Enjay »

Bit more information please. How are you playing these sounds? Copies of your SNDINFO etc.
User avatar
RaptorX
Posts: 71
Joined: Fri May 30, 2008 10:36 am
Location: hell

Re: Looping sounds?

Post by RaptorX »

Code: Select all

PIGSIGHT    PIGSIGHT
$Random PIGACT { PIGACT1 PIGACT2 PIGACT3 }
PIGACT1		PIGACT1
PIGACT2		PIGACT2
PIGACT3		PIGACT3
PIGPAIN     PIGPAIN
PIGDIE      PIGDIE
SHTGN1      SHTGN1
SHTGN2      SHTGN2
mutate      mutate
I dont see anything wrong. :(
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: Looping sounds?

Post by Ghastly »

How are you playing them? If decorate, what function? A_PlaySoundEx? Are you using them as ambient sounds? We can't do much if we don't have a lot of information.

Edit: Actually, those do look like they're defined for a monster, but what functions are you using to play them?
User avatar
RaptorX
Posts: 71
Joined: Fri May 30, 2008 10:36 am
Location: hell

Re: Looping sounds?

Post by RaptorX »

just a playsound
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Looping sounds?

Post by Enjay »

How? DECORATE? ACS? Console? What?

Show us the script, or tell us what you are typing. There are probably half a dozen ways to play a sound in Zdoom. We need to see exactly what you are doing. How about uploading a sample WAD and telling us how to reproduce the problem. If we have that kind of information, someone will be able to find out what's wrong.
User avatar
RaptorX
Posts: 71
Joined: Fri May 30, 2008 10:36 am
Location: hell

Re: Looping sounds?

Post by RaptorX »

decorate, a_playsound.
sorry it took long. had to put it on filefront, too large.
http://files.filefront.com/samplewad/;1 ... einfo.html
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Looping sounds?

Post by Enjay »

OK, first of all, minor problem, just so you know, the first sprite for the pig (PIGGA1) has somehow ended up outside the S_ markers so Zdoom halts when loading the file because the rotations for sprite A are not complete.

Anyway, you are right. Your sounds loop. It's bizarre and, I don't think it's anything to do with how you have set them up. On a hunch, I exported them all from the WAD and then opened them in GoldWave and resaved them. I stuck them back in the WAD and - tada! it seems to work. So, there is something odd about the sound files themselves. Whether this is a problem with the sound lumps, with Zdoom or with fmod, I have no idea. So, try a different program to save your sound files and see how that works. It's maybe also worth reporting this as a bug to flag it up to Graf/Randy and see if they can shed any light on the matter.

[edit] Even bringing down the console with a WAD using your original sounds loaded and typing "playsound pigsight" plays the appropriate sound which then loops over and over without me having to do anything else. If I load my fixed sounds, it just plays once, as it should.[/edit]

[edit2]And extracting one of your sound lumps and renaming it to replace an original Doom sound, then loading it, and only it - nothing else at all - then playing the sound has it looping over and over. Like I said, I don't know if there is actually a problem with the lumps themselves, or if Zdoom is at fault, but something about that combination of your sounds an Zdoom isn't working correctly. [/edit]
Last edited by Enjay on Wed Aug 27, 2008 5:46 pm, edited 1 time in total.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Looping sounds?

Post by randi »

I haven't looked, but I assume the sounds are WAVs with loop points saved in them. By using loop points in the audio file itself, you can divide the sound into an intro part and a looping part, with the intro part played only once and the looping part played repeatedly. (Though whether the playsound call should respect the absence of the looping flag if the sound was saved as a looping sound is perhaps debatable. It's not something I had actually considered.)
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Looping sounds?

Post by Enjay »

I didn't know that such a thing was possible in the WAV format. You learn something every day.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Looping sounds?

Post by Project Shadowcat »

Enjay wrote:I didn't know that such a thing was possible in the WAV format. You learn something every day.
It's perfect for music...
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Looping sounds?

Post by DBThanatos »

I've had this issue before a couple times (funnily in sounds that i thought "hey! looping this sounds cool!"). I thought it was an user error, so I dropped it without even asking. Now that i know, I can take advantage of this :D
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Re: Looping sounds?

Post by Zippy »

Enjay wrote:I didn't know that such a thing was possible in the WAV format. You learn something every day.
Enjay wrote:opened them in GoldWave and resaved them
I think GoldWave implements that, calling them "cues" (or something). You can try making a test sound with that and see what comes of it.

I remember having to deal with this because Half-Life didn't always have looping controls for sounds, so if you wanted a looping ambient sound you had to implement the cue into the sound file itself (or use the entities to create a loop of activations continuously replaying the sound).
User avatar
RaptorX
Posts: 71
Joined: Fri May 30, 2008 10:36 am
Location: hell

Re: Looping sounds?

Post by RaptorX »

enjay can you send me the fixed sounds?
I have no idea how to fix it.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Looping sounds?

Post by Enjay »

You would probably fix them by saving them as a different format entirely - eg as ogg files using oggdrop or something. Anyway, I *think* this is the WAD with the fixed versions and I *think* they are all there. If they don't work, let me know.

http://www.zshare.net/download/1780409046662f90/
Locked

Return to “Editing (Archive)”