David Griffith [Fri, 15 May 2015 04:30:56 +0000 (21:30 -0700)]
Fixing restart in games that have zcode in blorb files.
Copied from pull request from Bill Lash <william.lash@gmail.com> for the
master branch.
David Griffith [Thu, 14 May 2015 05:23:14 +0000 (22:23 -0700)]
Improper writing of variables and eval stack led to corrupt saves.
David Griffith [Wed, 13 May 2015 21:03:19 +0000 (14:03 -0700)]
Don't allow multiple playaiff() threads.
If there's already a playaiff() thread going when another playaiff()
thread is to be started, tell the first one to stop and clean up, then
join to it when it terminates before proceeding to start another
playaiff() thread. This will cleanly handle a barrage of samples called
to start in quick succession. For example, suppose your game has
several buttons that make noises. Doing "PRESS GREEN BUTTON. PRESS BLUE
BUTTON. PRESS RED BUTTON. PRESS YELLOW BUTTON" will not cause playaiff()
to trip over itself. Instead all the samples will be played briefly
except the one for the yellow button, which will play until the player
does something else noisy at the next command prompt. What's actually
heard is the last button noise. Such a reaction probably isn't
desirable, but is well-within the responsibility of the game author to
decide if and how AIFF samples will be allowed to stomp on one another.
The business about allowing only one AIFF at a time and one OGG/MOD at a
time, but mix the two comes from the fact that all other Z-machine
emulators with audio capability behave this way. The Z-machine spec
clearly says that only one sample (AIFF) may be played at once. I don't
know where the idea that allowing an OGG/MOD to be mixed came from or
who decided it was okay. The Blorb specs seem silent on the issue of
having multiple AIFFs and OGG/MODs playing at once.
David Griffith [Wed, 13 May 2015 08:20:43 +0000 (01:20 -0700)]
Stereoize monaural AIFF playback so that the mixer always gets stereo data.
David Griffith [Wed, 13 May 2015 07:32:27 +0000 (00:32 -0700)]
Fix some stupidity.
David Griffith [Wed, 13 May 2015 07:11:00 +0000 (00:11 -0700)]
Now providing the mixer with floats for ease of mixing later on.
David Griffith [Wed, 13 May 2015 05:35:56 +0000 (22:35 -0700)]
Added os_warn() to complement os_fatal().
David Griffith [Wed, 13 May 2015 04:59:11 +0000 (21:59 -0700)]
Added os_init_sound() stub to make the common code happy when building dfrotz.
David Griffith [Mon, 4 May 2015 23:38:19 +0000 (16:38 -0700)]
Update address of FSF and stuff.
David Griffith [Tue, 28 Apr 2015 07:00:17 +0000 (00:00 -0700)]
Cleaned up Makefile
David Griffith [Mon, 27 Apr 2015 21:51:45 +0000 (14:51 -0700)]
Fix line spacing and stuff.
David Griffith [Sat, 25 Apr 2015 09:58:10 +0000 (02:58 -0700)]
Using Erik's example code (modified) to do sample rate conversion
David Griffith [Sat, 25 Apr 2015 08:41:07 +0000 (01:41 -0700)]
Thank-you to Erik de Castro Lopo.
David Griffith [Wed, 22 Apr 2015 08:29:25 +0000 (01:29 -0700)]
Some -Wall fixes.
David Griffith [Sun, 19 Apr 2015 06:40:35 +0000 (23:40 -0700)]
Allow for os_stop_sample() to work properly, more or less.
David Griffith [Fri, 17 Apr 2015 11:44:24 +0000 (04:44 -0700)]
Replaced stupid use of usleep() with a semaphore.
David Griffith [Fri, 17 Apr 2015 08:46:25 +0000 (01:46 -0700)]
Putting this back in for a bit.
David Griffith [Thu, 16 Apr 2015 23:33:27 +0000 (16:33 -0700)]
Added missing sem_init()s and pthread_mutex_init()
David Griffith [Wed, 15 Apr 2015 08:25:04 +0000 (01:25 -0700)]
Beginnings of os_stop_sample()
David Griffith [Wed, 15 Apr 2015 07:47:54 +0000 (00:47 -0700)]
Playing AIFF samples in the background works now with some weird code.
After fooling around in ddd for quite some time, I discovered that the
code would work only if I put a delay in os_start_sample() just after
spawning the thread to run playaiff(). At this hour, I'm at a loss to
explain why this is happening.
David Griffith [Sun, 12 Apr 2015 07:58:25 +0000 (00:58 -0700)]
Now AIFF samples play correctly.
David Griffith [Sun, 12 Apr 2015 07:58:01 +0000 (00:58 -0700)]
At long last, a .gitignore file...
David Griffith [Sun, 12 Apr 2015 07:56:20 +0000 (00:56 -0700)]
Quiet down the Makefile.
David Griffith [Fri, 10 Apr 2015 09:12:44 +0000 (02:12 -0700)]
Roll back thread crap. Trying another angle for a while.
David Griffith [Fri, 10 Apr 2015 08:50:56 +0000 (01:50 -0700)]
Reworked the Makefile. There may be more changes like this.
David Griffith [Mon, 6 Jan 2014 09:09:24 +0000 (01:09 -0800)]
Attempting to get threads really working.
David Griffith [Mon, 6 Jan 2014 08:32:49 +0000 (00:32 -0800)]
Eliminated unnecessary opens and closes of sound device (eliminating pops).
David Griffith [Mon, 6 Jan 2014 08:19:47 +0000 (00:19 -0800)]
Minor advance in bleep processing.
David Griffith [Mon, 6 Jan 2014 04:12:56 +0000 (20:12 -0800)]
Bleeps starting to work with threads.
David Griffith [Mon, 6 Jan 2014 03:46:18 +0000 (19:46 -0800)]
Adding os_init_sound() for the core to call.
Delete prototype for os_speech_output().
David Griffith [Wed, 1 Jan 2014 09:55:29 +0000 (01:55 -0800)]
Pass a struct to playaiff() and friends.
David Griffith [Wed, 1 Jan 2014 03:13:19 +0000 (19:13 -0800)]
Falling back to blocking audio in preparation for an attempt with pthreads.
David Griffith [Tue, 31 Dec 2013 10:18:09 +0000 (02:18 -0800)]
Signal sanity.
David Griffith [Tue, 31 Dec 2013 08:58:35 +0000 (00:58 -0800)]
Comment out debug printf
David Griffith [Tue, 31 Dec 2013 06:16:27 +0000 (22:16 -0800)]
Kill all sound effects if os_stop_sample(0) is used (ie, when quitting).
David Griffith [Tue, 31 Dec 2013 06:16:00 +0000 (22:16 -0800)]
Trying cutting over to the AIFF instead of mixing it with the OGG.
David Griffith [Tue, 31 Dec 2013 05:00:45 +0000 (21:00 -0800)]
Trying floats
David Griffith [Mon, 30 Dec 2013 11:33:04 +0000 (03:33 -0800)]
Let's see if an ntohs() call helps with mixing AIFFs.
David Griffith [Mon, 30 Dec 2013 10:49:43 +0000 (02:49 -0800)]
A bit more farting around.
David Griffith [Thu, 26 Dec 2013 06:48:59 +0000 (22:48 -0800)]
AIFFs playing as 16-bit. Still need to match rate.
David Griffith [Thu, 26 Dec 2013 01:32:57 +0000 (17:32 -0800)]
Crude mixing with AIFF and OGG works. Need to match sample size and rate.
David Griffith [Fri, 20 Dec 2013 08:34:11 +0000 (00:34 -0800)]
Stopping sounds implemented. Mixing bleeps with music, not so much.
David Griffith [Fri, 20 Dec 2013 08:32:39 +0000 (00:32 -0800)]
Pass a resource number to os_start_sample() and friends.
Needed to support sound mixing.
David Griffith [Fri, 20 Dec 2013 07:26:31 +0000 (23:26 -0800)]
MODs and OGGs play (can't stop them yet).
David Griffith [Fri, 20 Dec 2013 07:26:04 +0000 (23:26 -0800)]
Just this for a while
David Griffith [Fri, 20 Dec 2013 07:25:09 +0000 (23:25 -0800)]
Update the TODO list
David Griffith [Tue, 17 Dec 2013 06:58:25 +0000 (22:58 -0800)]
Runtime endian determination.
David Griffith [Tue, 17 Dec 2013 04:48:24 +0000 (20:48 -0800)]
Oops with zgetopt.
David Griffith [Tue, 17 Dec 2013 04:48:08 +0000 (20:48 -0800)]
Not used anymore.
David Griffith [Tue, 17 Dec 2013 03:42:52 +0000 (19:42 -0800)]
Random cleanup and marking stuff static
David Griffith [Tue, 17 Dec 2013 03:13:21 +0000 (19:13 -0800)]
Not using this file anymore.
David Griffith [Mon, 16 Dec 2013 11:21:22 +0000 (03:21 -0800)]
Nobody uses this anymore.
David Griffith [Mon, 16 Dec 2013 10:50:28 +0000 (02:50 -0800)]
Updates and cleanups. Now things are more or less self-consistant.
David Griffith [Mon, 16 Dec 2013 10:33:19 +0000 (02:33 -0800)]
Preliminary changelog
David Griffith [Mon, 16 Dec 2013 10:32:49 +0000 (02:32 -0800)]
Docs cleanup and updates
David Griffith [Mon, 16 Dec 2013 10:30:27 +0000 (02:30 -0800)]
Shiny new Makefile.
David Griffith [Mon, 16 Dec 2013 08:54:55 +0000 (00:54 -0800)]
Forgot to change returns to exits. Added commentary.
David Griffith [Mon, 16 Dec 2013 08:22:01 +0000 (00:22 -0800)]
This approach seems to work better. Just AIFF for now.
David Griffith [Thu, 5 Dec 2013 00:43:07 +0000 (16:43 -0800)]
Messy, and needs much more work, but sound effects work.
David Griffith [Tue, 3 Dec 2013 02:13:06 +0000 (18:13 -0800)]
Now able to make crackly noises.
David Griffith [Sun, 1 Dec 2013 22:02:00 +0000 (14:02 -0800)]
Forgot to add ux_audio.c
David Griffith [Sun, 1 Dec 2013 09:05:10 +0000 (01:05 -0800)]
First stab at getting sound working. AIFF-only for now. Doesn't work.
David Griffith [Sun, 1 Dec 2013 09:04:49 +0000 (01:04 -0800)]
Don't assume NULL == 0
David Griffith [Mon, 25 Nov 2013 10:56:46 +0000 (02:56 -0800)]
Cleaned up os_process_arguments() and ux_init_blorb()
David Griffith [Fri, 25 Oct 2013 19:25:06 +0000 (12:25 -0700)]
Added instructions on building Frotz for DOS.
David Griffith [Fri, 25 Oct 2013 02:26:13 +0000 (19:26 -0700)]
Indents now match the rest of the code. Minor bugfixes. Remove junk.
Bracket sugar.
David Griffith [Fri, 25 Oct 2013 02:04:50 +0000 (19:04 -0700)]
Minor just-in-case alteration to cleanup code
David Griffith [Mon, 23 Sep 2013 05:08:34 +0000 (22:08 -0700)]
Another file that I'm not sure how got missed.
It's not even in the sfrotz tarball.
How did I get sfrotz compiled in the first place?
David Griffith [Mon, 23 Sep 2013 02:58:14 +0000 (19:58 -0700)]
How did I forget this file???
David Griffith [Wed, 19 Jun 2013 19:11:22 +0000 (12:11 -0700)]
Not going to talk about pre-compiled packages anymore. Out of my hands.
Not to say it's a bad thing. I appreciate seeing Frotz presented like
this.
David Griffith [Wed, 19 Jun 2013 19:06:41 +0000 (12:06 -0700)]
Make DOS Frotz less chatty on startup.
David Griffith [Wed, 19 Jun 2013 18:58:14 +0000 (11:58 -0700)]
Fixed compile failure for DOS
David Griffith [Wed, 19 Jun 2013 18:57:08 +0000 (11:57 -0700)]
64-bitness fixes from Bill Lash
David Griffith [Wed, 19 Jun 2013 17:54:39 +0000 (10:54 -0700)]
Blorb file name fix from Bill Lash
David Griffith [Thu, 7 Feb 2013 03:43:53 +0000 (19:43 -0800)]
Replaced now-obsolete os_path_open() with os_load_story()
David Griffith [Thu, 7 Feb 2013 03:02:20 +0000 (19:02 -0800)]
f_setup.story_file straggler
David Griffith [Thu, 6 Sep 2012 19:39:31 +0000 (12:39 -0700)]
64-bit problem fixed by Bill Lash
David Griffith [Thu, 6 Sep 2012 19:38:45 +0000 (12:38 -0700)]
Whoops. Duplicate defines
David Griffith [Thu, 6 Sep 2012 19:35:20 +0000 (12:35 -0700)]
Zblorb extensions and malloc cleanliness
David Griffith [Sat, 25 Aug 2012 04:55:04 +0000 (21:55 -0700)]
Filename buffer problem and tell why a blorb missing an exec chunk won't work.
David Griffith [Sat, 25 Aug 2012 04:36:24 +0000 (21:36 -0700)]
Fixed a problem where filenames of a certain length would cause a crash.
David Griffith [Sat, 25 Aug 2012 04:34:13 +0000 (21:34 -0700)]
Enabling compile options
David Griffith [Tue, 21 Aug 2012 08:06:31 +0000 (01:06 -0700)]
Commented out Unicode cleanliness. Interferes with command history in curses.
David Griffith [Tue, 21 Aug 2012 08:05:12 +0000 (01:05 -0700)]
Possible nit
David Griffith [Thu, 16 Aug 2012 09:08:47 +0000 (02:08 -0700)]
Now using DOS-specific Blorb code. Now Blorb works in DOS!
David Griffith [Thu, 16 Aug 2012 09:08:14 +0000 (02:08 -0700)]
Putting back things
David Griffith [Thu, 16 Aug 2012 08:43:35 +0000 (01:43 -0700)]
No reason for Blorb stuff to appear in the core.
David Griffith [Wed, 15 Aug 2012 20:49:51 +0000 (13:49 -0700)]
More thrashing around with DOS Frotz
David Griffith [Wed, 15 Aug 2012 20:48:58 +0000 (13:48 -0700)]
Adding ux_blorb.c and ux_blorb.h
David Griffith [Tue, 14 Aug 2012 03:23:01 +0000 (20:23 -0700)]
Makefile tweaks
David Griffith [Mon, 13 Aug 2012 07:32:29 +0000 (00:32 -0700)]
A first stab at getting Blorb to work for DOS. Not there yet.
David Griffith [Mon, 13 Aug 2012 07:32:05 +0000 (00:32 -0700)]
Enable Blorb compilation for DOS
David Griffith [Mon, 13 Aug 2012 07:31:27 +0000 (00:31 -0700)]
Better cleaning up after a DOS build
David Griffith [Mon, 13 Aug 2012 07:30:16 +0000 (00:30 -0700)]
Updated the TODO a bit
David Griffith [Mon, 13 Aug 2012 05:38:12 +0000 (22:38 -0700)]
Zcode loads and executes from Blorb files
David Griffith [Mon, 13 Aug 2012 05:11:59 +0000 (22:11 -0700)]
Tweaks for better cleanup after DOS builds
David Griffith [Mon, 13 Aug 2012 04:56:40 +0000 (21:56 -0700)]
Updated README
David Griffith [Tue, 10 Jul 2012 04:11:01 +0000 (21:11 -0700)]
syntactic sugar for DOS building
David Griffith [Tue, 10 Jul 2012 04:10:26 +0000 (21:10 -0700)]
f_setup mods for the DOS port
David Griffith [Tue, 10 Jul 2012 02:24:34 +0000 (19:24 -0700)]
semi-removed now un-needed declaration