Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2006, 01:31 PM
Junior Member
 
Join Date: Feb 2004
Posts: 7
Default SWFKit 2: Problem with saving an audio recording

I have a problem with saving an audio recording:
when I save an audio recording it only saves "full seconds" which means that parts of the recording which are between - let's say - second 1 and second 2 are missing because the recording is only saved until second 1.

I set the bytespersec rate and only since then I have this problem. My code goes like this:

------------------------------------------------------------------------------
//recording
player = new MCI();
player.sendCmdString("open new type waveaudio alias myWave");
player.sendCmdString("set myWave format tag pcm");
player.sendCmdString("set myWave samplespersec 44100");
player.sendCmdString("set myWave bitspersample 16");
player.sendCmdString("set myWave channels 1");
player.sendCmdString("set myWave bytespersec 86000");
player.sendCmdString("set myWave time format ms");
player.sendCmdString("record myWave from 0 overwrite");

//saving
FlashPlayer.bindData("id");
FlashPlayer.updateData(true);
var myWave = Shell.getSpecialFolder("temp") + "\\" + FlashPlayer.id + ".wav";
player.sendCmdString("stop myWave");
player.sendCmdString("save myWave " + myWave + " wait");
player.sendCmdString("close myWave");
------------------------------------------------------------------------------

If I don't set the bytespersec rate everything works fine except that the recorded file is no longer playable in the Windows Media Player or causes other players like the Realplayer or VLC-player to show a wrong file length (a file which is actually 11 seconds long appears to be 92 seconds in these players).

Can anybody help out please?
Reply With Quote
  #2 (permalink)  
Old 08-29-2006, 07:15 AM
Junior Member
 
Join Date: Feb 2004
Posts: 7
Default Re:SWFKit 2: Problem with saving an audio recording

Sometimes the solution is easier than one might think... I figured out the problem. The settings for the soundfile have to go in one single line/command:

player.sendCmdString("open new type waveaudio alias myWave");
player.sendCmdString("set myWave samplespersec 44100 bitspersample 16 channels 1 alignment 2 bytespersec 88200 format tag pcm time format ms");

Just in case somebody has the same problem, too
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:50 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.