thanks, i played a bit with this part and this is the part that bugs me - for lines let's say to the first million it works just fine, even above, but when i tried to print a single line
it took a lot of time (actually i didn't even waited for result) is that normal behaviour.
hi gurus
i'm trying to get the count of number of records of a file
as : wc -l file1.txt
iam getting the correct count by in out put i'm getting the file name too
i get the output as follows "7 file1.txt"
my question is how to avoid filename in the output.
might be a basic... (20 Replies)
Hi,
Is it possible to find the total number of records processed by awk at begining.
NR gives the value at the end. Is there any variable available to find the value at the begining?
Thanks
----------
Suman (1 Reply)
Hai
I have a flat file which contains more than 6 crore lines or records. I want to delete only one line, using line number. For example I want to delete 414556 th line . How to do this using sed or awk command.
thanks (3 Replies)
Initially i store some files into anothe file Y. Now i want read the contents of file Y one by one do some check on each file.
i,e
Open file Y (contains multiple files)
First read a file , do some check on that individual file.If that file satisfies teh condition put it in another file.
Now... (1 Reply)
Hi,
I have CSV file which looks like below, i want to calulate number of records for each brand say SOLO_UNBEATABLE E and SOLO_UNBEATABLE F combined and record count is say 20 . i want to calculate for each brand, and here only first record will have all data and rest of record for the brand... (2 Replies)
Hi All,
I want to find the number of records in a file of a particular directory
I have a file as abcd.txt in the path
var/hr/payments/
I want to find number of records in abcd.txt file in a single command.
I tried the following
cd /var/hr/payments/wc -l abcd.txt
I got... (5 Replies)
I am doing a loading process. I am loading data from a Oracle source to Oracle target.
For example there is an SQL statement:
Insert into emp_1
Select * from emp_2 where deptno=20;
In this case my source is emp_2 and loading into my target table emp_1. This process is automated. Now I... (3 Replies)
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
How does one assign a variable, x to equal the number of records in a different file.
I have a simple command such as below:
awk -F "\t" '(NR>5) { if(($x == "0/0")) { print $0} }' a.txt > a1.txt
but I want x to equal the number of records in a different file, b.txt (10 Replies)
Discussion started by: Geneanalyst
10 Replies
LEARN ABOUT CENTOS
set_volume_per_voice
set_volume_per_voice(3alleg4) Allegro manual set_volume_per_voice(3alleg4)NAME
set_volume_per_voice - Sets the volume of a voice. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void set_volume_per_voice(int scale);
DESCRIPTION
By default, Allegro will play a centered sample at half volume on both the left and right channel. A sample panned to the far right or left
will be played at maximum volume on that channel only. This is done so you can play a single panned sample without distortion. If you play
multiple samples at full volume, the mixing process can result in clipping, a noticeable form of distortion. The more samples, the more
likely clipping is to occur, and the more clipping, the worse the output will sound.
If clipping is a problem - or if the output is too quiet - this function can be used to adjust the volume of each voice. You should first
check that your speakers are at a reasonable volume, Allegro's global volume is at maximum (see set_volume() below), and any other mixers
such as the Windows Volume Control are set reasonably. Once you are sure that Allegro's output level is unsuitable for your application,
use this function to adjust it.
Each time you increase the parameter by one, the volume of each voice will halve. For example, if you pass 4, you can play up to 16 centred
samples at maximum volume without distortion.
If you pass 0 to this function, each centred sample will play at the maximum volume possible without distortion, as will all samples played
through a mono driver. Samples at the extreme left and right will distort if played at full volume. If you wish to play panned samples at
full volume without distortion, you should pass 1 to this function. Note: this is different from the function's behaviour in WIPs 3.9.34,
3.9.35 and 3.9.36. If you used this function under one of these WIPs, you will have to increase your parameter by one to get the same vol-
ume.
Note: The default behaviour has changed as of Allegro 4.1.15. If you would like the behaviour of earlier versions of Allegro, pass -1 to
this function. Allegro will choose a value dependent on the number of voices, so that if you reserve n voices, you can play up to n/2 nor-
malised samples with centre panning without risking distortion. The exception is when you have fewer than 8 voices, where the volume
remains the same as for 8 voices. Here are the values, dependent on the number of voices:
1-8 voices - set_volume_per_voice(2)
16 voices - set_volume_per_voice(3)
32 voices - set_volume_per_voice(4)
64 voices - set_volume_per_voice(5)
Of course this function does not override the volume you specify with play_sample() or voice_set_volume(). It simply alters the overall
output of the program. If you play samples at lower volumes, or if they are not normalised, then you can play more of them without distor-
tion.
It is recommended that you hard-code the parameter into your program, rather than offering it to the user. The user can alter the volume
with the configuration file instead, or you can provide for this with set_volume().
To restore volume per voice to its default behaviour, pass 1.
SEE ALSO reserve_voices(3alleg4), set_volume(3alleg4), install_sound(3alleg4), detect_digi_driver(3alleg4), detect_midi_driver(3alleg4)Allegro version 4.4.2 set_volume_per_voice(3alleg4)