0

In my app I have to do data transfer via ultrasound (20 to 22 kHz).. I have one idea to do that... i.e.,

At Sending side:

1.First I ll convert my data(NSdata or NSString ... ) to .wav file(I really don't know is it possible?)

2.I ll convert that converted .wav file to ultrasound (20 to 22 KHz) or simply play that in loud speaker

At receiving side:

1.It ll convert received ultrasound(20 to 22 kHz) or recorded .wav file from other device to NSData

My question is, Is it possible to convert data(NSdata or NSString ... ) to .wav file?, and then is it possible to produce ultrasound(20 to 22KHz) from .wav file? It may look silly... I don't know It ll work.. But please tell ur idea about this

jeeva
  • 21
  • 5
  • http://stackoverflow.com/questions/10034346/ios-how-to-produce-ultrasonic-sound – Maulik Dec 09 '13 at 10:25
  • You're making this putative link acoustically? A quick check of the iPhone microphone frequency response suggests significant fall-off above 20 kHz. – FluffulousChimp Dec 09 '13 at 10:27
  • @Maulik - I seen this link... I think I have to step back of generating ultrasonic sound... if there is any possibility to generate NSData to sound – jeeva Dec 09 '13 at 10:40
  • 1
    I don't know how to convert NSData to .wav file but some one did it in java http://stackoverflow.com/questions/4483662/convert-data-to-sound-and-back. But If u have find solution to convert NSData to .wav file u can play it in variable frequency by http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html – Vinupriya Arivazhagan Dec 09 '13 at 12:24

1 Answers1

0

I merely designed a way to this. I didn't work it out, but I think it will give you an idea.

At sending side:

  1. first convert your NSData to byte stream
  2. then convert that byte stream to .wav file
  3. then play your .wav file with (20 to 22 kHz) by http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html

At receiving side:

  1. play your received sound(20 to 22 kHz) by http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
  2. then convert low frequency .wav file to byte stream
  3. then convert byte stream to NSData