Quantcast PlaySoundFile() limitations - WoWInterface
Thread Tools Display Modes
10-31-12, 12:15 AM   #1
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
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?
  Reply With Quote
10-31-12, 03:55 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,255
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?
  Reply With Quote
10-31-12, 05:27 AM   #3
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
Originally Posted by Dridzt View Post
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.
  Reply With Quote
10-31-12, 03:59 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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...
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
10-31-12, 04:28 PM   #5
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
Originally Posted by Phanx View Post
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.
  Reply With Quote
11-01-12, 07:11 PM   #6
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
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
  Reply With Quote
11-01-12, 08:38 PM   #7
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 101
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?)
  Reply With Quote
11-01-12, 08:48 PM   #8
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
Originally Posted by F16Gaming View Post
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

Last edited by Trololol : 11-01-12 at 09:22 PM.
  Reply With Quote
11-01-12, 10:29 PM   #9
Sharparam
A Flamescale Wyrmkin
 
Sharparam's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 101
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).
  Reply With Quote
11-02-12, 03:04 AM   #10
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
Originally Posted by F16Gaming View Post
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 :/

Last edited by Trololol : 11-02-12 at 03:19 AM.
  Reply With Quote
09-08-14, 08:37 PM   #11
Trololol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 13
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.
  Reply With Quote
09-20-14, 09:33 AM   #12
Bringer
A Fallenroot Satyr
 
Bringer's Avatar
Join Date: Jul 2012
Posts: 26
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
  Reply With Quote
09-20-14, 06:51 PM   #13
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 792
Really impressed with the piano skills.
__________________
Profile: Curse | Wowhead
  Reply With Quote
10-14-14, 04:02 PM   #14
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,135
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.

Originally Posted by Bringer View Post
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
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 10-14-14 at 04:31 PM.
  Reply With Quote
10-16-14, 02:48 PM   #15
Bringer
A Fallenroot Satyr
 
Bringer's Avatar
Join Date: Jul 2012
Posts: 26
note that only .ogg and .mp3 formats are supported.

example from CensusPlus addon..

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

Last edited by Bringer : 10-16-14 at 02:52 PM.
  Reply With Quote
10-16-14, 09:17 PM   #16
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
10-16-14, 09:23 PM   #17
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,135
Sound\\Creature\\Peon\\PeonWhat4.wav still works.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
10-28-14, 07:44 AM   #18
def9
A Cobalt Mageweaver
 
def9's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 219
Supposedly the issues with sound have been fixed with 6.0.3.

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.
__________________
Epiria, level 100 Ret/Holy Paladin
Simkin level 100 Combat Rogue
Feldeemus, level 100 Arcane Mage
  Reply With Quote
10-28-14, 10:21 AM   #19
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by Phanx View Post
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.
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.
  Reply With Quote
10-28-14, 10:24 AM   #20
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by Fizzlemizz View Post
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
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » PlaySoundFile() limitations

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off