home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / multimed / 4224 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.4 KB

  1. Xref: sparky comp.multimedia:4224 comp.os.ms-windows.programmer.misc:5334
  2. Newsgroups: comp.multimedia,comp.os.ms-windows.programmer.misc
  3. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!ugle.unit.no!humpty.edb.tih.no!lumina.edb.tih.no!ketil
  4. From: ketil@edb.tih.no (Ketil Albertsen,TIH)
  5. Subject: Re: Playing ADPCM audio data under windows
  6. Message-ID: <1993Jan25.092049.10800W@lumina.edb.tih.no>
  7. Sender: ketil@edb.tih.no (Ketil Albertsen,TIH)
  8. Organization: T I H / T I S I P 
  9. References: <1993Jan23.151043.23034@impmh.uucp>
  10. Posting-Front-End: Winix Conference v 92.05.15  1.20 (running under MS-Windows)
  11. Date: Mon, 25 Jan 1993 09:20:39 GMT
  12. Lines: 37
  13.  
  14. In article <1993Jan23.151043.23034@impmh.uucp>, cm@impmh.uucp (Colin Manning) 
  15. writes:
  16.  
  17. >According the the ms documentation, they accept data in 44.1Khz samples,
  18. >20.05Kh and 10.025Khz. ADPCM is sampled at different rate.
  19. >
  20. >Anyone any idea how easy/difficult it is to convert audio data sampled at
  21. >one rate to another ?
  22.  
  23. Now that you ask: Yes, it is difficult... :-)
  24.  
  25. If the only difference was the sampling rate, plain linear interpolation
  26. would probably be satisfactory - and anyone who can do simple multiplication
  27. and division in c could do the job.
  28.  
  29. But while Windows uses a simple, linear PCM format, ADPCM is quite a 
  30. different thing. The "A", Adaptive, means that the step size is not
  31. constant, but depends on the slope of the curve. The "D", Differential,
  32. means that the encoded sample value is not a direct value of the signal 
  33. level but the difference from the previous value. These two factors
  34. make it quite a job for one inexperienced with digital signal processing.
  35.  
  36. Sure, to experienced DSP people, the job is "fairly simple" (at least
  37. in theory), but I suspect that you ask because you do not know a
  38. sufficient amount of the theory.
  39.  
  40. A while ago, I picked up the CCITT recommendation G.722, hoping to write
  41. a G.722-to-Windows-sound. Sorry, my math background was much to weak.
  42. Yours may be better than mine, though! (G.722 is a 7 kHz/48-56-64 kbit
  43. encoding. G.721 is a 3.4 kHz/32 kbit encoding; they are significantly
  44. different.)
  45.  
  46. So, rather than trying to code it yourself, try to find a library to
  47. buy. If you want anything close to real time conversion, look for
  48. hardware. After all, the chips to do it will be going into millions of
  49. telephones as G.722/G.721 becomes commonplace, so they ought not be
  50. too expensive. Maybe they still are, today.
  51.