LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-14-2004, 10:27 AM   #1
floydes
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
Unhappy Serial port problem


Sorry to bother, but i have the following problem. I'm trying to implement
AFSK modem 2400 baud rate, through serial port. That is serial flow is generated on the fly to AFSK signal in soundcard. I have dropouts. The question is how to make it smooth ? Is multithreaded proccess will help(one for read from serial port, one for streaming to sound card ) ?

Any suggestions are appreciated.

WBR, Andrei Buin.
 
Old 10-14-2004, 11:50 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 33
You need to buffer the input, when you have enough (I don't know how you want to determine "enough") then stream it to output.

A lot of media applications read ~20% of the expected data before they output. This allows the input to be sloer

And yes, this would be better off as two separate threads - one is a reading client - the other is the sound card 'server'
Use shared memory, memory mapped files or possibly pipes.
pipes do not buffer however.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ serial port program problem doar Programming 3 10-01-2004 10:46 AM
serial port problem... linux4john Linux - Software 1 10-30-2003 10:02 PM
problem in serial port communication linux4john Linux - Newbie 3 10-30-2003 09:26 PM
Serial port problem ruchika Linux - Networking 0 08-15-2003 04:18 PM
Problem with Serial port mritunjay Linux - Networking 1 04-22-2002 01:59 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration