Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 19, 2016, 11:54   #121
calris
Adept
 
Join Date: Mar 2016
Posts: 194
calris is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
Alright... adding a "data->loaded = false;" after playing a sound did the trick for me. It's very ugly, but it works
Oh Yuck! - You are essentially reloading the sound into memory from disk every time it is played (although file system caching should help with any delays).

I worry about what reloading a sound mid-play might do internally - if the SDL sound system is in the middle of playing a sample, you are effectively ripping it out from underneath it.

I've never really looked at what SDL under Linux does when you play the same sample memory while it is already being played...
calris is offline   Reply With Quote
Old April 19, 2016, 11:57   #122
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,665
PowerWyrm is on a distinguished road
Quote:
Originally Posted by calris View Post
Hmm - have you had a look at how I've implemented sound for Windows?

Take a look at:

https://github.com/calris/angband/co...nd-devel-clean

It's a much cleaner version (but in the end identical end result) to what Nick pulled. It's much easier to see what is going on
I bet the Windows sound module will work nicely. Now that the SDL module works fine in PWMAngband, I'll port that too.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old April 19, 2016, 11:59   #123
calris
Adept
 
Join Date: Mar 2016
Posts: 194
calris is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
I bet the Windows sound module will work nicely. Now that the SDL module works fine in PWMAngband, I'll port that too.
Don't bet on it - I never tested it
calris is offline   Reply With Quote
Old April 19, 2016, 16:55   #124
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,665
PowerWyrm is on a distinguished road
Quote:
Originally Posted by calris View Post
Don't bet on it - I never tested it
Well I've now ported everything and everything works fine again.

The only problems I've noticed which were already present in the old system were:
- Mix_PlayMusic() not playing a sound from the beginning under Windows (fixed by reloading the sound)
- PlaySound(SND_PURGE) not stopping the current sound (didn't change that, so the Windows module actually plays sounds over the top of each other)
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old April 19, 2016, 16:57   #125
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,665
PowerWyrm is on a distinguished road
By the way, sound.cfg can be removed from \lib\sounds since it's not used anymore...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old April 19, 2016, 17:04   #126
calris
Adept
 
Join Date: Mar 2016
Posts: 194
calris is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
By the way, sound.cfg can be removed from \lib\sounds since it's not used anymore...
It's still used by at least the OS X port. There may be others, not 100% sure
calris is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reworking the entire magic system (yay)! TricksterWolf Development 8 September 20, 2015 21:22
Mk build system? CJNyfalt Development 11 March 25, 2015 08:25
Resist system Jungle_Boy Development 65 August 30, 2011 04:10
Combat System Sirridan Development 9 July 14, 2009 08:11
RFC: Middle Earth map for Un in ASCII; is it readable? Bandobras Variants 13 November 25, 2007 04:15


All times are GMT +1. The time now is 22:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.