WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   PlaySoundFile() limitations (https://www.wowinterface.com/forums/showthread.php?t=45022)

Trololol 10-31-12 12:15 AM

PlaySoundFile() limitations
 
I had an old addon that I have used since Wrath of the Lich King. It still works perfectly fine, however it seems like I can now only play about ~6 sounds at any given time with the function PlaySoundFile. I made a macro that played 3 sound files, and I could only press it twice at a time. This limit as far as I know has only been introduced since Cataclysm.
With developing addons that require more than 6 sounds played at a given time, is there any way this limit can be changed at all?

Dridzt 10-31-12 03:55 AM

Sounds more like a sound format problem than a number of sounds problem.

Are all the sounds (I'm assuming it's custom sounds and not game sounds) in the same format?

Trololol 10-31-12 05:27 AM

Quote:

Originally Posted by Dridzt (Post 268096)
Sounds more like a sound format problem than a number of sounds problem.

Are all the sounds (I'm assuming it's custom sounds and not game sounds) in the same format?

Yes, they're set to MP3. I have also re-encoded them as OGG, but the same issue occurs.

Phanx 10-31-12 03:59 PM

I'm not aware of any limitation on the number of sounds that may be played at once, but it would not surprise me at all to learn that there was one. Why on earth do you need to play more than 6 sounds at a time? I can't even imagine why you would need to play more than maybe 2 sounds at a time...

Trololol 10-31-12 04:28 PM

Quote:

Originally Posted by Phanx (Post 268126)
I'm not aware of any limitation on the number of sounds that may be played at once, but it would not surprise me at all to learn that there was one. Why on earth do you need to play more than 6 sounds at a time? I can't even imagine why you would need to play more than maybe 2 sounds at a time...

I was updating a piano addon that I had made/modified myself in WoTLK from the code structure of The Bokenspeil. I had a demo that could be played on the piano to test broadcasting between different players, however after renewing my subscription I found that it now rarely plays any of the keys or input from keys. What I did was modify the mp3 length to 1.2 secs and under (for higher keys), that helps a bit but it still has not solved the issue.
I'm pretty sure I have a video on one of my old HDDs lying around of my piano addon back in WoTLK. If I can find one I'll upload it for comparison purposes.

Trololol 11-01-12 07:11 PM

Here's the video if anyone is interested on how it was like back in WoTLK
http://www.youtube.com/watch?v=T8r-8t-M6-E

Sharparam 11-01-12 08:38 PM

Tried playing a few sounds, and pretty sure I had 9 playing at the same time, which was the number of sounds triggered. Maybe your settings are limiting it to play a maximum of 6 at a time? (Though the "Low" option says 24 channels will be used, the other 18 channels could be in use?)

Trololol 11-01-12 08:48 PM

Quote:

Originally Posted by F16Gaming (Post 268221)
Tried playing a few sounds, and pretty sure I had 9 playing at the same time, which was the number of sounds triggered. Maybe your settings are limiting it to play a maximum of 6 at a time? (Though the "Low" option says 24 channels will be used, the other 18 channels could be in use?)

I have an "addon sounds only" button that disables and mutes sound effects, music and ambient sounds. The mp3s are played through the master channel. The sound channels are set to High (64). It does seem like I can only play at maximum 9 sounds at a time though, which kind of sucks since this addon is kind of useless now.
Just for comparison, I uploaded what it sounds like now
http://www.youtube.com/watch?v=FcATl7fMlvE

Sharparam 11-01-12 10:29 PM

The only difference that I can think of then is that I used ogg files instead of mp3. But that shouldn't make a difference (couldn't hurt trying though).

Trololol 11-02-12 03:04 AM

Quote:

Originally Posted by F16Gaming (Post 268226)
The only difference that I can think of then is that I used ogg files instead of mp3. But that shouldn't make a difference (couldn't hurt trying though).

Yeah, I stated that earlier, I tried making a macro that played 3 ogg files at the same time, but I could only press the macro 3 times at once which was about 9 sounds, which kinda sucks :/

Trololol 09-08-14 08:37 PM

Does someone mind checking if anything has changed with the PlaySoundFile at all? I haven't been playing WoW for over a year and am just curious if it still has the same limitations.

Bringer 09-20-14 09:33 AM

for the WoD beta PlaySoundFile is broken, Blizzard was made aware of this a few weeks ago..
and as of latest build it appears to be working again

Vlad 09-20-14 06:51 PM

Really impressed with the piano skills. :)

Fizzlemizz 10-14-14 04:02 PM

Is this broken again on Live/Beta? I have tried playing custom sounds in several formats (.wav, .mp4, .ogg) and while PlaySoundFile returns true for willPlay and a number for soundHandle I never actually hear anything.

Edit: I can hear sounds played from the "Sounds\\..." folder.

Quote:

Originally Posted by Bringer (Post 297024)
for the WoD beta PlaySoundFile is broken, Blizzard was made aware of this a few weeks ago..
and as of latest build it appears to be working again


Bringer 10-16-14 02:48 PM

note that only .ogg and .mp3 formats are supported.

example from CensusPlus addon..

PlaySoundFile("Interface\\AddOns\\CensusPlus\\Sounds\\CensusComplete1.ogg")

Phanx 10-16-14 09:17 PM

Based on other forum posts it sounds like support for .mp3 files has been unofficially dropped, and you should use .ogg files instead. Honestly I'm not sure why anyone is still using .mp3 files in addons, as it was pretty strongly implied years ago when they introduced .ogg support and switched all the game's own sounds over to .ogg that they were going to drop .mp3 at some point. Monkey see, monkey do, I guess. :p

Fizzlemizz 10-16-14 09:23 PM

Sound\\Creature\\Peon\\PeonWhat4.wav still works.

def9 10-28-14 07:44 AM

Supposedly the issues with sound have been fixed with 6.0.3.

Quote:

Originally Posted by World of Warcraft Patch 6.0.3, 10-28-2014
UI

PlayMusic API should now work correctly and be able to play MP3s once more.
PlaySound API should now work correctly and be able to play MP3s once more.


Resike 10-28-14 10:21 AM

Quote:

Originally Posted by Phanx (Post 298121)
Based on other forum posts it sounds like support for .mp3 files has been unofficially dropped, and you should use .ogg files instead. Honestly I'm not sure why anyone is still using .mp3 files in addons, as it was pretty strongly implied years ago when they introduced .ogg support and switched all the game's own sounds over to .ogg that they were going to drop .mp3 at some point. Monkey see, monkey do, I guess. :p

I actually prefer mp3, unless i need more then 2 channels. Mp3 can hold album, artist, song info, store album covers. You can easily read the length of an mp3 file, and 90% of the audio players can't even play oggs properly, i look at you WMP and Winamp. Additionally it's a missconception that ogg is more compact, and has better quality compared to mp3, which is only true under 128kbps, but i mean even in 1998 i encoded mp3s with 320kbps.

Also if you do a conversion mp3 is far more superior to keep the rms volumes at higher bitrates, aka you won't loose that much of the original song.

Most likely if you don't have a proper sound system, or you just not that much a quality addict, or you don't have the ears for it, then you won't notice this.

Resike 10-28-14 10:24 AM

Quote:

Originally Posted by Fizzlemizz (Post 298122)
Sound\\Creature\\Peon\\PeonWhat4.wav still works.

You can only play wavs from the Blizzard "Interface/Sound" folder. Clearly they were lazy to convert vanilla stuff, i mean Warcraft 3 sounds. :P


All times are GMT -6. The time now is 11:10 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI