Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: [XE5] Record Audio on Mac, play on Windows.


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jun 24, 2015 10:09 PM Last Post By: Eli M
André Diel

Posts: 27
Registered: 7/28/07
[XE5] Record Audio on Mac, play on Windows.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2015 12:37 PM
Hello.

I need capture an audio in the MAC / OSX and play on Windows.
Does anyone have any tips or example?

I'm doing this:

Procedure Tform1.Record;
var FAudioCap: TAudioCaptureDevice;
      sDir: String;
begin
    FAudioCap := TCaptureDeviceManager.Current.DefaultAudioCaptureDevice;
    sDir := GetHomePathDelimin + 'Temp' + PathDelim;
    if not DirectoryExists(sDir) then
      CreateDir(sDir);
 
    FAudioCap.FileName := sDir + 'Audio.mp3';
    FAudioCap.StartCapture;
end;


When running on Windows with TMediaPlayer component have the following returns:
"Unsupported Media file Audio.mp3 '.

Thank you.
Eli M

Posts: 1,346
Registered: 11/9/13
Re: [XE5] Record Audio on Mac, play on Windows.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 24, 2015 10:09 PM   in response to: André Diel in response to: André Diel
You can convert between formats with (I don't think there is anything there that is XE8 specific):

http://www.fmxexpress.com/convert-sound-files-and-apply-audio-effects-in-delphi-xe8-firemonkey-on-android-and-ios/

Also if you drill into the RTL you'll see what format it is really recording to (FMX.Media.Win.pas and FMX.Media.Mac.pas).
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02