Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, May 30, 2011

Lots of Linux, OpenSource, games

I was looking for some gimp tutorials and via pics i found this great Linux game collection site, this is a must visit for people demanding games on Linux distros. Below is the link:

Tuesday, May 24, 2011

Lots of Linux Links

Lots of linux links, for every Linux lover / user this link is one of must visit. ;-)

Friday, May 20, 2011

Portable Linux applications.

After using Winpenpack, portableapps for winows i was trying to build my own collection of portable apps for Linux, but good news is that some people have already done that for us all. ;-)

Below is the link of the site where you can download Linux Portable apps.

If you are trying to make portable builds then you can do it by setting LD_LIBRARY_PATH to your apps dirwctory and then launching it via shell script. I have created a script which copies all the dependencies into your application's directory so that you build that a portable suit. You can find some important scripts in Linux label ( look right list of labels ).  

Thursday, January 15, 2009

Output audio through serial port. Serial Port Player v0.1

Serial port player – serialplayer
This software lets us play audio through serial port.
Hardware requirement: (below values are for USB-to-serial chip)

  • female com port connector

  • resistors - 1k

  • capacitors 4.4 uF
For laptop, i used this hardware:-

  • USB serial converter. I am using Nokia 6600 pc data cable. Which is nothing but a prolific PL2303 usb-to-serial chip with cable utilizing only its TX, RX and GND pins.
Software requirement:

  • A Linux distro with gcc (GNU's compiler collection) for source compilation.

  • serialportplayer – binary OR source code.
[Illustration of project]
Raw audio data => serialportplayer => serial port => low pass filter => speaker(s).
The software collects raw audio data and processes it according to serial port data transfer speed. The processed data is then output through serial port's TX pin. The processing includes oversampling and modulation (sigma-delta is recommended but current version of program doesn't uses it purely).
Raw data:
The data is raw audio. This raw audio data is extracted from audio files using audacity software as -

  • Run audacity

  • Open any audio file

  • Export that file into raw format.

  • the raw format must be :- unsigned 8 bit / sample, mono(1channel).
Please note down the samplerate of the original audio file and use it during serial play.
Using serialportplayer:

  • start your shell – e.g. Konsole, xterm

  • execute su command and give root's password.

  • Run serial port player as:- ./tplay OR ./serialportplayer

  • e.g. ./tplay humdum.raw 16000
if your system can't run the binary you can compile it from source:
cc –o serialplayer serialplayer.c
The following where the sources using which i accomplished the project:
Any interested person must read about 1 bit audio and sigma-delta modulation.
Please connect 1k resistor to TX pin and capacitor in parallel to TX and GND pins. These values are for USB-to-Serial adapter. Use appropriate values for normal serial port at back of desktop pcs.

Download link: This link has tplay source and binary of ttyUSB, it uses USB-to-Serial device as serial port.

Download :serialportplayer.rar
Password: serialportplayer_homelabs

Thursday, October 23, 2008

Script which makes ldd's output clean.

ldd $1 | awk '{print "cp -f "$1" ./"}' > $1deps

My shell scripts

Shell script which copies all the libraries (dependencies) into the application's folder:

ldd $1 | grep -io "/[a-zA-Z]*.*so.* " > $1deps
cat $1deps | sed 's/^/cp -f /' > $
rm -rfd ldd_libs ; mkdir ldd_libs
sed 's/$/ ldd_libs/' $ > $
rm -f $1deps $
sh $
echo "Done. Now cleaning...."
echo "checkout ldd_libs directory."
rm -f $