Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: VOIP example  (Read 3696 times)

0 Members and 1 Guest are viewing this topic.

troopson

  • Newbie
  • *
  • Posts: 30
    • View Profile
VOIP example
« on: July 06, 2011, 04:47:27 pm »
i used some code from VOIP example and i set blocking sockets to none so my application is real-time etc. Here is the code from example which makes my program working sloooooooow.

Code: [Select]
while ((myOffset == mySamples.size()) && !myHasFinished)
            sf::Sleep(0.01f);

When i remove this receiving the sound doesnt work. How do i change this?[/code]

Haikarainen

  • Guest
Re: VOIP example
« Reply #1 on: July 06, 2011, 06:49:25 pm »
Quote from: "troopson"
i used some code from VOIP example and i set blocking sockets to none so my application is real-time etc. Here is the code from example which makes my program working sloooooooow.

Code: [Select]
while ((myOffset == mySamples.size()) && !myHasFinished)
            sf::Sleep(0.01f);

When i remove this receiving the sound doesnt work. How do i change this?[/code]


Im not experienced in the current matter, but try commenting out the sf::Sleep

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: VOIP example
« Reply #2 on: July 06, 2011, 09:43:54 pm »
Quote from: "Haikarainen"
Quote from: "troopson"
i used some code from VOIP example and i set blocking sockets to none so my application is real-time etc. Here is the code from example which makes my program working sloooooooow.

Code: [Select]
while ((myOffset == mySamples.size()) && !myHasFinished)
            sf::Sleep(0.01f);

When i remove this receiving the sound doesnt work. How do i change this?[/code]


Im not experienced in the current matter, but try commenting out the sf::Sleep

Simply commenting that out will cause unintended behavior because the while statement is unbracketed.

Haikarainen

  • Guest
Re: VOIP example
« Reply #3 on: July 06, 2011, 11:12:40 pm »
Quote from: "JAssange"
Quote from: "Haikarainen"
Quote from: "troopson"
i used some code from VOIP example and i set blocking sockets to none so my application is real-time etc. Here is the code from example which makes my program working sloooooooow.

Code: [Select]
while ((myOffset == mySamples.size()) && !myHasFinished)
            sf::Sleep(0.01f);

When i remove this receiving the sound doesnt work. How do i change this?[/code]


Im not experienced in the current matter, but try commenting out the sf::Sleep

Simply commenting that out will cause unintended behavior because the while statement is unbracketed.


No shit sherlock

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
VOIP example
« Reply #4 on: July 06, 2011, 11:31:25 pm »
Honestly guys, stop those silly full quotes! :P
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: VOIP example
« Reply #5 on: July 07, 2011, 01:24:03 pm »
Quote from: "Haikarainen"
No shit sherlock

I was having a hard time judging the skill level of the op from his posts so I just thought I'd clarify.