Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Missing binary data from socket

New Here ,
Mar 17, 2014 Mar 17, 2014

I try to play audio file from c++ socket server installed on user machine. Problem is that when i play file, it`s length is 1 min, but file which is sending via socket is 3 mins.

Here is my function for load data into byte array.

** loading data

private function socketDataHandler(e:ProgressEvent):void

                    {

                              if (socket.bytesAvailable)

                              {

                                        socket.readBytes(bytes, bytes.length, socket.bytesAvailable);

                              }

                    }

** play file

var sound:Sound = new Sound();

sound.loadCompressedDataFromByteArray(recordBytes, recordBytes.length);

 

sound.play();

Where i am wrong?

TOPICS
ActionScript
242
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation