home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19883 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  3.0 KB

  1. Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!ldo
  2. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: QuickTime questions
  5. Message-ID: <1992Dec16.173320.12836@waikato.ac.nz>
  6. Date: 16 Dec 92 17:33:20 +1300
  7. References: <1992Dec14.163630.3885@dartvax.dartmouth.edu>
  8. Organization: University of Waikato, Hamilton, New Zealand
  9. Lines: 46
  10.  
  11. In article <1992Dec14.163630.3885@dartvax.dartmouth.edu>, Jim.Matthews@dartmouth.edu (Jim Matthews) writes:
  12. > I'm having a couple of problems writing some QuickTime software.  These
  13. > problems occur under both QT 1.0 and QT 1.5.
  14. >
  15. > 1) I can't find a reasonable way to extract the samples of an audio track,
  16. > taking track edits into account.  GetMediaSample() doesn't respect track
  17. > edits, so I want to ask it only for as many samples as I know are used
  18. > contiguously by the track.  I hoped to get that information from the
  19. > duration parameter of GetMediaNextInterestingTime(); but in my experience
  20. > GMNIT always puts "1" in the duration parameter, and I don't want to call
  21. > GetMediaSample() for every 8 bits of sound data.
  22.  
  23. If you want to take account of track edits, you should be using
  24. GetTrackNextInterestingTime. Use the nextTimeTrackEdit flag, and you will
  25. get back intervals corresponding to entire track edits. Just watch out for
  26. the zero-length "phantom edit" at the end (or beginning, if you're going
  27. backwards) of each track. Then you use TrackTimeToMediaTime to map the
  28. times you get to media times.
  29.  
  30. There is a small design oversight in QuickTime 1.0. TrackTimeToMediaTime will
  31. map any track time value to the corresponding media time value, but there's
  32. no way to specify which of the two media time values you may want at the
  33. boundary between two track edits. I think you always get the one corresponding
  34. to the edit that starts at that point--never the one that ends there.
  35.  
  36. QuickTime 1.5 introduces a new call, GetTrackEditRate, which you should be
  37. able to use to calculate the exact ending media time for the edit.
  38.  
  39. > 2) The dataFormat field of the SoundDescription record is supposed to be
  40. > set to 'raw ' for unsigned sound samples, but in my experience it always
  41. > comes back as 0x00000000.  So now I check for 0x00000000, but is this a
  42. > problem with the movies I'm looking at or with the documentation?
  43.  
  44. I've seen a lot of this, too. The QuickTime 1.5 documentation makes it clear
  45. that you should watch out for this; 0 and 'raw ' values are interchangeable.
  46.  
  47. By the way, I recommend you get hold of the QuickTime 1.5 documentation--
  48. I think it's available on its own from APDA, if you don't want to shell out
  49. for the full toolkit update with the new 1.5 developer CD and PhotoCD sampler.
  50. It's *much* improved over the 1.0 documentation (apart from being twice as
  51. thick :-)).
  52.  
  53. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  54. Computer Services Dept                     fax: +64-7-838-4066
  55. University of Waikato            electric mail: ldo@waikato.ac.nz
  56. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  57.