Jump to content

Skullcode

Members
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. i use Twsocket as udp Client that is communicating with udpserver the server sends data in Bytes and the client should Receive This Data in Bytes as well i have tried the following based on what i see in the Demo Sample of OverbyteIcsUdpLstn Demo procedure TMainForm.WSocketDataAvailable(Sender: TObject; Error: Word); var aBytes : Tbytes; begin wsocket.Receive(aBytes, length(aBytes)); //... end; but this freezes the application and immediately crashed
  2. Skullcode

    converting this TidBytes code To Tbytes

    in my example i am stuck in sending those Bytes i am using Twsocket UDP that's what i do var ABytes: TBytes; EncodedBytes: TBytes; bytesHead : TBytes; baseaudio : string; begin baseaudio := 'Audio1'; SetLength(ABytes, len); Move(data^, ABytes[0], len); EncodedBytes := Encodeaudio(ABytes); SetLength(bytesHead, 6 + Length(EncodedBytes)); TEncoding.UTF8.GetBytes(baseaudio, 1, 6, bytesHead, 0); Move(EncodedBytes, bytesHead[6], Length(EncodedBytes)); wsocketudp.Send(bytesHead, Length(bytesHead)) when i send the data without adding header it sent just fine what is my Mistake ? the exception raised First chance exception at $004072A3. Exception class $C0000005 with message 'access violation at 0x004072a3: read of address 0x0bd600d8'. Process room.exe (5680) at this Line Move(EncodedBytes, bytesHead[6], Length(EncodedBytes));
  3. Skullcode

    converting this TidBytes code To Tbytes

    i already Converted the RawToBytes To Tbytes as i posted up there var Bytes: TBytes; SetLength(Bytes, len); Move(data^, Bytes[0], len); i am confused to do the copying line CopyTIdString('Audio1', Bytes, 0); CopyTIdBytes(RawToBytes(Buffer^, Buffersize), 0, Bytes, 6, Buffersize); CopyTidstring requires TidBytes
  4. Skullcode

    converting this TidBytes code To Tbytes

    i found this code in another forum var Bytes: TidBytes; Bytes := RawToBytes(data^, len); SetLength(Bytes, 6 + Buffersize); CopyTIdString('Audio1', Bytes, 0); CopyTIdBytes(RawToBytes(Buffer^, Buffersize), 0, Bytes, 6, Buffersize); any idea how to convert it To TBytes i am not sure how to assign the Pointer data and do the exact same things with copying string using Tbytes var Bytes: TBytes; SetLength(Bytes, len); Move(data^, Bytes[0], len);
  5. Skullcode

    this regex function gets unexpected results at some cases

    From where this dots came up it is no in the string i posted very weird
  6. i use this Regex function to check if the string have a Characters that I specify in the pattern on not Function CheckCharsinString(const astr: string):Boolean; var Regexs : TRegEx; i : integer; svalue : string; Allowed : string; begin svalue := Trim(astr); if Regexs.IsMatch(svalue, '^[ء-يA-Za-z0-9٠-٩⁰-⁹$™®©¤?@~<>«»✿❢•°،‘♔ہ¹ے;✧¢¯☆⊱٭✰❥¨.,’^*()%!\s-]+$') then begin Result := True; end else begin Result := False; end; end; when i check the following string CheckCharsinString('✿شـ❢ـوكـ❢ـ‏‏ Dan✿') it always Return False. it should return True sense all that chars i use is in regex pattern . what is my Mistake ?
  7. Skullcode

    Opus codec

    i am trying to build a voice communication app by sending a data from microphone to a Tcpserver and send it back to connected Clients i am looking for a component that can get a micrpohone audio input in bytes using opus codec in order to be able to send this data in real time . is there any known library in delphi VCL that can capture audio input data that encoded to opus codec ?
  8. Skullcode

    TWebBrowser very Weird Behavior with Gif images

    Yes its very weird i guess its a bug with twebbrowser on reading similar gif names in multiple instances
  9. Skullcode

    TWebBrowser very Weird Behavior with Gif images

    Any one tested and get same results? Is it a bug with twebbrowser itself?
  10. Skullcode

    TWebBrowser very Weird Behavior with Gif images

    another example with Twebbrowser it cause same result the gif is included you can place it where the exe located webbrowser example.zip
  11. Skullcode

    TWebBrowser very Weird Behavior with Gif images

    this is a minimal example for better understanding webbrowser example.zip
  12. i have created two Forms Form 1 Form 2 each form has TWebBrowser Control now i have a Gif that i call its name Foo.gif <img src="Foo.gif" border="0" /> when i load this image in form1 TWebBrowser its animated normally . when i load it in Form2 TWebBrowserit doesn't animated i am Adding this gif once at run Time To each form when form Created also i notice that this happened if the gif that i try to load to another TWebBrowser have the same name so if i load foo.gif in form1 it will animate in form1 hence when loaded to Form2 TWebBrowser and it got the same name of the previously loaded one it doesn't animate in Form2 TWebBrowser any idea why this behavior happened ?
  13. Skullcode

    Tbutton Flashing

    can i have flashwindow effect to be applied on a VCL Tbutton Control ?
  14. Skullcode

    check if App Minimized

    when i minimize My Vcl Application i do the following check in a Timer if WindowState = wsMinimized then begin //do some logging end; but this if condition doesn't detect whether the app is Minimized or not any idea how to detect if the app Minimized ?
  15. is this a correct way to check if the Twsocket client is connected ? if wsocket1 .State = wsConnected then //do something
×