AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Wave audio component live stream problem using indy 10
Thema durchsuchen
Ansicht
Themen-Optionen

Wave audio component live stream problem using indy 10

Ein Thema von drama22 · begonnen am 29. Jun 2014 · letzter Beitrag vom 15. Jul 2014
 
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#1

Wave audio component live stream problem using indy 10

  Alt 29. Jun 2014, 09:15
iam using indy10 Udp client and server

i have problem with send buffer from the client to the server here is my code
Delphi-Quellcode:
procedure TForm1.recorderData(Sender: TObject; const Buffer: Pointer;
  BufferSize: Cardinal; var FreeIt: Boolean);
begin
Freeit :=True;
if sendtocl.active then
sendtocl.SendBuffer(RawToBytes(Buffer^, Buffersize))
else
micstop.Caption := 'busy';
end;
server on read

Delphi-Quellcode:
procedure TForm1.UDPReceiverUDPRead(AThread: TIdUDPListenerThread; const AData: TIdBytes; ABinding: TIdSocketHandle);
var
  AudioDataSize: Integer;
  AudioData : Pointer;
begin
  try
    EnterCriticalSection(Section);
    try
      AudioDataSize := Length(AData);
      if AudioDataSize > 10 then
      begin
        try
          if not Player.Active then
          begin
            Player.Active := True;
            Player.WaitForStart;
          end;
        except
        end;
        if BlockAlign > 1 then Dec(AudioDataSize, AudioDataSize mod BlockAlign);
        AudioData := AudioBuffer.BeginUpdate(AudioDataSize);
        try
          BytesToRaw(AData, AudioData^, AudioDataSize);
        finally
          AudioBuffer.EndUpdate;
        end;
      end else
      begin
        Player.Active := False;
        Player.WaitForStop;
      end;
    finally
      LeaveCriticalSection(Section);
    end;
  except
  end;
end;
also iam trying to debug the project

i got Erroneous_Type on Sendbuffer and RawToBytes any help would suggested ?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz