Skip to main content
Participant
March 17, 2014
質問

Missing binary data from socket

  • March 17, 2014
  • 返信数 0.
  • 256 ビュー

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?

このトピックへの返信は締め切られました。