This building block generates a RAW sinewave and will be the basis of a sinewave sweep generator.
This is also proof of concept and is issued as Public Domain. The final draft will have pseudo-variable bit rates for varying frequency ranges. This is the default mode, 8 bit depth, mono, 8000Hz sampling rate.
Enjoy finding simple solutions to often very difficult questions...
Bazza.
Results of this demo, note the "clear" command has been edited out:-
Good evening, I'm currently working on a BASH script to convert audio between file formats and I've come across a snag. At the beginning of the script, I'm having the system check to see if any files with the .m4a extension exist in the directory, and if so, it runs the script. If there are no... (1 Reply)
IKHz_SW_OSX.py
A DEMO mono _pure_ sinewave generator using standard text mode Python 2.6.7 to at least 2.7.3.
This code is EASILY modifyable to Python version 3.x.x...
This DEMO kids level 1KHz generator is mainly for a MacBook Pro, (13 inch in my case), OSX 10.7.5 and above. See below...... (0 Replies)
A very simple crude sinewave generator.
The file required is generated inside the code, is linear interpolated and requires /dev/audio to work. Ensure you have this device, if not the download oss-compat from your OS's repository...
It lasts for about 8 seconds before exiting and saves a... (5 Replies)
I put this together to search for unused IP addresses on a router. It's run as a Bash Command on OSX 10.9. Basically the user inputs the router address' IP range to sweep. 'jot' spits out a list of IP addresses based on that input and each one of those gets pinged. The output looks like this (tab... (4 Replies)
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)
Ok guys, gals and geeks...
As from today I am starting to learn awk in earnest doing something totally different.
I am going to create a pseudo-Audio_Function Generator centred around OSX 10.11.x minimum. The code below is a tester to see what the possibilities are.
All waveforms will be... (11 Replies)
Hi all...
I intend to do an Audio Function Generator using Awk, (already started thanks to Don), but the biggest thing I have struggled with was variable frequency.
I was going to generate differing sized waveforms on the fly but that would that would mean the frequencies are dependent on any... (2 Replies)
Hi all...
Well I have not been inactive but working out how to make OSX 10.14.x command line audio player have a variable sample rate.
This is a back door as afplay does not have a sample rate flag unlike aplay for ALSA, in Linux flavours.
This is a DEMO only but a derivative of it will... (2 Replies)
Discussion started by: wisecracker
2 Replies
LEARN ABOUT OPENSOLARIS
rmvb
rmvb(9F) Kernel Functions for Drivers rmvb(9F)NAME
rmvb - remove a message block from a message
SYNOPSIS
#include <sys/stream.h>
mblk_t *rmvb(mblk_t *mp, mblk_t *bp);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
mp Message from which a block is to be removed. mblk_t is an instance of the msgb(9S) structure.
bp Message block to be removed.
DESCRIPTION
The rmvb() function removes a message block (bp) from a message (mp), and returns a pointer to the altered message. The message block is
not freed, merely removed from the message. It is the module or driver's responsibility to free the message block.
RETURN VALUES
If successful, a pointer to the message (minus the removed block) is returned. The pointer is NULL if bp was the only block of the message
before rmvb() was called. If the designated message block (bp) does not exist, -1 is returned.
CONTEXT
The rmvb() function can be called from user, interrupt, or kernel context.
EXAMPLES
This routine removes all zero-length M_DATA message blocks from the given message. For each message block in the message, save the next
message block (line 10). If the current message block is of type M_DATA and has no data in its buffer (line 11), then remove it from the
message (line 12) and free it (line 13). In either case, continue with the next message block in the message (line 16).
1 void
2 xxclean(mp)
3 mblk_t *mp;
4 {
5 mblk_t *tmp;
6 mblk_t *nmp;
7
8 tmp = mp;
9 while (tmp) {
10 nmp = tmp->b_cont;
11 if ((tmp->b_datap->db_type == M_DATA) &&
(tmp->b_rptr == tmp->b_wptr)) {
12 (void) rmvb(mp, tmp);
13 freeb(tmp);
14 }
15 tmp = nmp;
16 }
17 }
SEE ALSO freeb(9F), msgb(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.11 16 Jan 2006 rmvb(9F)