home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19728 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.4 KB  |  33 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!usc!rpi!simsh
  3. From: simsh@crockett1c.its.rpi.edu (Big Guy)
  4. Subject: SPBSetDeviceInfo doesn't like me! -- help!
  5. Message-ID: <shh23#-@rpi.edu>
  6. Nntp-Posting-Host: crockett1c.its.rpi.edu
  7. Date: Sun, 13 Dec 1992 03:45:57 GMT
  8. Lines: 23
  9.  
  10. Hi, I am trying to write a small app to turn on and off the sound play
  11. through on my IIsi. I have a problem with this line:
  12.  
  13.    if (SPBSetDeviceInfo(myRefNum,siPlayThruOnOff,(Ptr)&volume))
  14.    {
  15.        SysBeep(1);
  16.        ExitToShell();
  17.    }
  18.  
  19. Problem is, everything is set up right, volume has a value -- 3, and the open
  20. device command works. However, when it hits this line, it doesn't give an error
  21. and it seems to work fine, except that the sound play through is not turned
  22. on! I debugged it in THINK C, and everything seemingly worked fine, except that
  23. sound didn't turn on. I have used this code in another app where it worked
  24. fine, but that was a much bigger app, so my question is: which manager perhaps
  25. do I need to initialize? That seems to be the only reason I can think of why
  26. it won't work, but I can't figure out what needs to be initialized to make it
  27. work, nor can I find anything in IM 6 about it. Please e-mail me directly, I
  28. won't be able to read this group too readily for a while. Thanks for all help!
  29.  
  30. -- 
  31. Hillel Sims      Rensselaer Polytechnic Institute      e-mail: simsh@rpi.edu
  32.  
  33.