Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

create_sample(3alleg4) [debian man page]

create_sample(3alleg4)						  Allegro manual					    create_sample(3alleg4)

NAME
create_sample - Constructs a new sample structure of the specified type. Allegro game programming library. SYNOPSIS
#include <allegro.h> SAMPLE *create_sample(int bits, int stereo, int freq, int len); DESCRIPTION
Constructs a new sample structure of the specified type. Read chapter "Structures and types defined by Allegro" for an internal description of the SAMPLE structure. The `bits' parameter can be 8 or 16, `stereo' can be zero for mono samples and non-zero for stereo samples, `freq' is the frequency in hertz, and `len' is the number of samples you want to allocate for the full sound buffer. RETURN VALUE
Returns a pointer to the created sample, or NULL if the sample could not be created. Remember to free this sample later to avoid memory leaks. SEE ALSO
load_sample(3alleg4), destroy_sample(3alleg4) Allegro version 4.4.2 create_sample(3alleg4)

Check Out this Related Man Page

load_sample(3alleg4)						  Allegro manual					      load_sample(3alleg4)

NAME
load_sample - Loads a sample from a file. Allegro game programming library. SYNOPSIS
#include <allegro.h> SAMPLE *load_sample(const char *filename); DESCRIPTION
Loads a sample from a file, supporting both mono and stereo WAV and mono VOC files, in 8 or 16-bit formats, as well as formats handled by functions registered using register_sample_file_type(). Example: SAMPLE *sample = load_sample(user_input); if (!sample) abort_on_error("Couldn't load sample!"); RETURN VALUE
Returns a pointer to the SAMPLE or NULL on error. Remember to free this sample later to avoid memory leaks. SEE ALSO
destroy_sample(3alleg4), load_voc(3alleg4), load_wav(3alleg4), play_sample(3alleg4), save_sample(3alleg4), register_sam- ple_file_type(3alleg4), exsample(3alleg4) Allegro version 4.4.2 load_sample(3alleg4)
Man Page

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL - copy fiel contents to array then compare against other file

Basically to illuminate i want to take a file with mutliple lines, C:\searching4theseletters.txt a b c Read this into an array @ARRAY and then use this to compare against another file C:\inputletters.txt b o a c n a (9 Replies)
Discussion started by: bradleykins
9 Replies

2. Shell Programming and Scripting

data sampling

I have a requirement where I have multiple flat file sources. I need to create sample data from each source. Example: Source 1 has 10 flat files-- member, transaction,item,email,....etc Now if I get any 10 records (say first 10 records) from the member flat file, I need to find those matching... (2 Replies)
Discussion started by: arrivederci
2 Replies

3. UNIX for Dummies Questions & Answers

Enter data at end of a file

Hi All, I have a sample datafile: 5.1 5.2 0.8 6.1 What I want to do is create an additional 3 rows with the number "0.7". so that I now have: 5.1 5.2 0.8 6.1 0.7 0.7 (3 Replies)
Discussion started by: tintin72
3 Replies

4. UNIX for Advanced & Expert Users

Comma separate issue in UNIX

In awk the field seprator is not working properly, I am trying to cut the fields from the file based on the delimiter example comma (,) awk -F, "{print {$1 FS $3 FS $5 FS FS $2}}" Sample.csv But i am not getting desired output can anyone help me how to check real ascii comma there in my... (9 Replies)
Discussion started by: rspwilliam
9 Replies

5. Shell Programming and Scripting

How to select lines randomly without replacement in UNIX?

Dear Folks I have one column of 15000 lines and want to select randomly 5000 of them in five different times without replacement. I am aware that command 'shuf' and 'sort -R' could select randomly those lines but I am not sure how could I avoid the replacement of selection line. Does anyone have... (10 Replies)
Discussion started by: sajmar
10 Replies

6. UNIX for Beginners Questions & Answers

Extract lines if string found from last 30 min only

Hi guys, Appreciate your help as I am stuck with searching the logs for last 30 minutes from the current time. Current time is time when you execute the script and it will search for <string> through the logs for last 30 minutes only and if <string> found then print those lines only. The... (18 Replies)
Discussion started by: rockstar
18 Replies