home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / programm / 8252 < prev    next >
Encoding:
Text File  |  1993-01-22  |  2.9 KB  |  65 lines

  1. Nntp-Posting-Host: idaho.et.byu.edu
  2. Lines: 52
  3. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!news.byu.edu!news
  4. Message-ID: <#0#@byu.edu>
  5. Date: Thu, 21 Jan 93 20:59:17 MST
  6. From: yackd@idaho.et.byu.edu (Don Yacktman)
  7. Newsgroups: comp.sys.next.programmer
  8. Distribution: world
  9. References: <aw#@byu.edu> <1993Jan21.231029.3409@leland.Stanford.EDU>
  10. Organization: Brigham Young University, Provo UT USA
  11. Subject: Re: Music Kit Question
  12.  
  13.  
  14. In article <1993Jan21.231029.3409@leland.Stanford.EDU>, daj@ccrma.stanford.edu writes:
  15. >In article <aw#@byu.edu>  writes:
  16. >> 
  17. >> 
  18. >> I've been playing around a lot with getting background scores
  19. >> playing in my games, and have run up against a couple of problems.
  20. >> 
  21. >> I can get either sound effects _or_ music to work quite well alone,
  22. >> but getting both simultaneously from the same app does not work.
  23. >> I have a few theories about why this is, and how to fix it...but
  24. >> if someone else has got sound playback and music working simultaneously
  25. >> from the same app already, I'd be interested in a few tips.  I
  26. >> looked at the latest Ensemble, and it too can only do sound _or_
  27. >> DSP synthesis, but not both together.  Ack!  Of course, if I spin
  28. >> off a separate process to play the scorefile and do the sounds from
  29. >> the game itself, everything works fine.  This is easy with distributed
  30. >> objects, but I'd rather have my ScorePlayer object reside in the
  31. >> same process, since this is wholly inelegant.  (It works, though.)
  32. >> 
  33. >
  34. >I don't understand the question.  One of the most interesting features of
  35. >the latest Ensemble (3.1 music kit) is the ability to combine playing of
  36. >sound files with DSP synthesis.  This DOES work.  
  37. >
  38. >I suggest looking closely at how Ensemble does it and do the same thing in your
  39. >application.
  40.  
  41. I answered this is e-mail, but since the replay was posted, too, I
  42. thought I ought to clarify for any confused net readers...
  43.  
  44. The problem I had was that I couldn't get Ensemble to do sound+music.
  45. Looking at the source, I see it should, and I suspect it's my lack of
  46. knowledge about Ensemble that was the block there.  I wish someone
  47. who knew how to use it would take the time to write decent user docs.
  48.  
  49. Anyway, sound+music is pretty easy under 3.0, and I did figure it out.
  50. The next release of PacMan will include the necessary source code, so
  51. any of the curious will be able to muck around with it.  It you need the
  52. source before then for any reason, just ask me and I'll send it.  The
  53. basic solution is to create your own sound out device and your own play
  54. stream and then play the sounds by enqueueing the data buffer on the
  55. play stream.  You _cannot_ use the -play* methods in the Sound object,
  56. though, since they do something which conflicts with the music kit.  In
  57. fact, I've found those methods to be very buggy and not worth using,
  58. especially if a sound will be played back repeatedly, such as in a game.
  59.  
  60. Questions, flames, etc. should be mailed to me...
  61.  
  62. Later,
  63. -Don Yacktman
  64. yackd@alaska.et.byu.edu
  65.