Top Forums Programming My first PERL incarnation... Audio Oscillograph Post 303038666 by wisecracker on Tuesday 10th of September 2019 05:39:33 PM
Hi stomp...
(Apologies for typos.)

Originally Posted by stomp
It is. I'm currently working with cygwin. It's a reliable way to get many of the essential tools if you have to use windows. But it's a bit slow. I don't know, if it's fast enough for this program.
I can give a few pointers as I designed the bash script '' here: AudioScope Project. to include it.
It captures using the now defunct 'SoundRecorder.exe' for Windows 8.1 OR CygWin's builtin '/dev/dsp'. Both methods take around 2 seconds total for a 1 second burst, BUT, because CygWin is _emulating_, (for want of a better description), a UNIX style environment accessing either capture mode takes around 1/8th of a second berfore the audio device activates.
SoundRecorder.exe, (which is no longer part of Windows 10), can only do a standard '.wav' file at 44100sps and /dev/dsp a '.raw' unsigned integer file at 8000sps from the command line.
The 'mintty' terminal is quite capable of all the escape codes I have used so far, including the title bar.
The above shell project was designed for hopefully ALL *NIX flavours with bash and included SoX, a dependency, as the prime mover for capture.
This User Gave Thanks to wisecracker For This Post:
Test Your Knowledge in Computers #203
Difficulty: Medium
Perl is not an interpreted language.
True or False?

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Audio HELP Please!

I know about next to nothing, and I am trying to play an audio file on HP-UX 10.2 (743i) every time I try to use the ‘/opt/audio/bin/AudioCP &’ command I get an error message that says “Unable to access audio hardware.” I checked the man page on audio, and both Aserver and rpcd are running. Am I... (4 Replies)
Discussion started by: Matt
4 Replies

2. UNIX for Dummies Questions & Answers

playing audio

Hi all, I play audio through the web browser and it plays ok on windows. When i try the same thing on unix i get the error message "sh: /usr/local/bin/sox: not found. I've tried 'locate sox' and can't seem to find it. Is there some way I can change the browser settings so they play the audio... (3 Replies)
Discussion started by: molli_81
3 Replies

3. Programming

Video/Audio Streaming in C?

Hi Folks, I have just joined, and have a problem... I am doing my thesis and need to transfer a file from server to the client, while doing that I want to stream the file ( the files being video/audio files). I am unable to figure out abt the streaming part...if there exist any libraries... (0 Replies)
Discussion started by: pappu
0 Replies

4. Ubuntu

save audio thats being played.

I want to save a song which is being played from internet. I cant find where it gets cached. Im also not sure if the whole sing will remain in the cache while the song finishes. There must be a way using /dev/audio or something. Im not able to figure out. (4 Replies)
Discussion started by: bbala
4 Replies

5. UNIX for Dummies Questions & Answers

Audio Problem

Hi I recently installed BT 5 Gnome on my Asus laptop running on Intel HD graphics. I've been having problems with audio, at first I experienced the basic problem that was solved by adding pulse audio to the starting programs. This allowed me to open Sound preferences but I still have no sound.... (0 Replies)
Discussion started by: edreeso
0 Replies

6. Slackware

Problems with audio recording in Audacity 2.0.5. Slackware64 14.1; Intel HD Audio.

I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Discussion started by: qzxcvbnm
2 Replies
SLAPD-PERL(5)							File Formats Manual						     SLAPD-PERL(5)

slapd-perl - Perl backend to slapd SYNOPSIS
/etc/ldap/slapd.conf DESCRIPTION
The Perl backend to slapd(8) works by embedding a perl(1) interpreter into slapd(8). Any perl database section of the configuration file slapd.conf(5) must then specify what Perl module to use. Slapd then creates a new Perl object that handles all the requests for that par- ticular instance of the backend. You will need to create a method for each one of the following actions: * new # creates a new object, * search # performs the ldap search, * compare # does a compare, * modify # modifies an entry, * add # adds an entry to backend, * modrdn # modifies an entry's rdn, * delete # deletes an ldap entry, * config # module-specific config directives, * init # called after backend is initialized. Unless otherwise specified, the methods return the result code which will be returned to the client. Unimplemented actions can just return unwillingToPerform (53). new This method is called when the configuration file encounters a perlmod line. The module in that line is then effectively `use'd into the perl interpreter, then the new method is called to create a new object. Note that multiple instances of that object may be instantiated, as with any perl object. The new method receives the class name as argument. search This method is called when a search request comes from a client. It arguments are as follows: * object reference * base DN * scope * alias dereferencing policy * size limit * time limit * filter string * attributes only flag (1 for yes) * list of attributes to return (may be empty) Return value: (resultcode, ldif-entry, ldif-entry, ...) compare This method is called when a compare request comes from a client. Its arguments are as follows. * object reference * dn * attribute assertion string modify This method is called when a modify request comes from a client. Its arguments are as follows. * object reference * dn * a list formatted as follows ({ "ADD" | "DELETE" | "REPLACE" }, attributetype, value...)... add This method is called when a add request comes from a client. Its arguments are as follows. * object reference * entry in string format modrdn This method is called when a modrdn request comes from a client. Its arguments are as follows. * object reference * dn * new rdn * delete old dn flag (1 means yes) delete This method is called when a delete request comes from a client. Its arguments are as follows. * object reference * dn config This method is called once for each perlModuleConfig line in the slapd.conf(5) configuration file. Its arguments are as follows. * object reference * array of arguments on line Return value: nonzero if this is not a valid option. init This method is called after backend is initialized. Its argument is as follows. * object reference Return value: nonzero if initialization failed. CONFIGURATION
These slapd.conf options apply to the PERL backend database. That is, they must follow a "database perl" line and come before any subse- quent "backend" or "database" lines. Other database options are described in the slapd.conf(5) manual page. perlModulePath /path/to/libs Add the path to the @INC variable. perlModule ModName `Use' the module name ModName from filterSearchResults Search results are candidates that need to be filtered (with the filter in the search request), rather than search results to be returned directly to the client. perlModuleConfig <arguments> Invoke the module's config method with the given arguments. EXAMPLE
There is an example Perl module `SampleLDAP' in the slapd/back-perl/ directory in the OpenLDAP source tree. ACCESS CONTROL
The perl backend does not honor any of the access control semantics described in slapd.access(5); all access control is delegated to the underlying PERL scripting. Only read (=r) access to the entry pseudo-attribute and to the other attribute values of the entries returned by the search operation is honored, which is performed by the frontend. WARNING
The interface of this backend to the perl module MAY change. Any suggestions would greatly be appreciated. Note: in previous versions, any unrecognized lines in the slapd.conf file were passed to the perl module's config method. This behavior is deprecated (but still allowed for backward compatibility), and the perlModuleConfig directive should instead be used to invoke the module's config method. This compatibility feature will be removed at some future date. FILES
/etc/ldap/slapd.conf default slapd configuration file SEE ALSO
slapd.conf(5), slapd(8), perl(1). OpenLDAP 2012/04/23 SLAPD-PERL(5)
All times are GMT -4. The time now is 12:52 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy