473,586 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

playback wav buffer on Mac.

HI,friends:
_I am sorry that my topic may be not supposed here,but,I like here and
just know few places in all groups._

I want to playback wave buffer on mac. in realtime.
so,I divide the buffer of a wave data into small parts for playback.

the problem is:
when I define PCM_FRAME_SIZE as the value 4096 or 4096 mutiplied by an
int.the playback routine "play" the wave buffer and I can hear the
sound.
but when other values were assigned to PCM_FRAME_SIZE, for example,
#define PCM_BUFFER_SIZE 400 //as below
the routine will be terminated by the system with signal 10,or
signal11.

Q:___Are there any contrains on Mac. of sound manager(concern ed with
buffer)?___
---------------------------------------------------
p-codes for ref.
----------------------------------------------------
#define PCM_FRAME_SIZE 400
int i=0;
while(i not over buffer){
channelptr ch=nil;
sndlisthandle header;
memcpy(desBuf+P CM_FRAME_SIZE*i ,srcBuf+PCM_FRA ME_SIZE*i,sizeo f
(char)*PCM_FRAM E_SIZE);
//it's confirmed that srcBuf contains the real wav data,
//I got it using debuger.
setupsndheader( header...,...,. ..,...,PCM_FRAM E_SIZE,&hdrlen) ;
sndnewchannel(& ch,false);
sndplay(ch,fals e);
disposechannel( ch,false);
disposehandle(( handle)header);
i++;
}

Nov 14 '05 #1
2 1797
Jerry wrote:
_I am sorry that my topic may be not supposed here, but I like here
and just know few places in all groups._


Just when you thought September had finally ended... Damn you Google!

<sigh>
Nov 14 '05 #2
"Jerry" <zi****@gmail.c om> writes:
[...]
Q:___Are there any contrains on Mac. of sound manager(concern ed with
buffer)?___


We have no idea. There are a number of comp.sys.mac.* newsgroups; try
one of them.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
389
by: Todd Nirenstein | last post by:
does anyone know if you can kick off a .wav file and start some amount of time into the file. For example. kick off example.wave and start 1 minute and 13 seconds in the the audio playback? thanks in advance.
2
332
by: Jacob | last post by:
I'm desperately in need of some direction here... I'm trying to write some software that would play back a series of images as a movie. I'm fairly new to C and I can't seem to find any resources on this. What I'm looking for is a brief tutorial (or VERY well document code) that will open a series of images, buffer them properly in memory,...
1
2228
by: Brett Hofer | last post by:
Does anyone know of a good component for audio(.WAV) playback that supports double-speed/normal/half-speed? I need to provide this control in an .aspx page and control it using C#. I have tried using the DirectX playback but it is very limited and doesn't support variable speed from what I have seen. I've also read postings that say to...
5
1541
by: SaherAlim | last post by:
Hi, How can I record line-in and playback music simutaniously. Basically I want to merge two sounds. One comming from mic and the other is the played music from PC. i can access line-in (mic) from multiple API's.(Directsound, wavein) but I am unable find a way to record currently playing sounds. Is there a way to access data from sound...
1
1696
by: Paolo | last post by:
Hi all! I'm new to Linux but I have a complex task (at least it seems so to me!): I created a small multicast protocol in C++ and now I need an application for testing. I have to create an application that sends and receive video streams, and diplays the videoo too on the screen. In the protocol API I have two methods, StreamWrite and...
2
7881
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer (AxSHDocVw.AxWebBrowse) control. The TreeView is populated with nodes that when clicked play an audio clip that is stored on the CD and navigate the...
0
1678
by: dugfresh36 | last post by:
I am trying to control the playback of a tutorial I am building in Flash 8 Basic. I want the user to be able to go through the tutorial in two ways: 1) by manually clicking forward and back buttons; and, 2) by clicking a "PLAY" button and having the tutorial drive itself. It's this second method that is killing me. Here's what I'm trying to...
0
1382
by: krudonix | last post by:
Hey i've developed a call logging system that records to mono a-law wav files. now i want to add a feature to playback the audio as its being recorded an event fires when i recieve audio private evAudio(intptr buffer,int size) {
0
1198
by: Hillbilly | last post by:
I haven't started to research this yet. I have to assume others who have lots of experience have some comments they could make here about developing a PowerPoint slide show playback server to enable playback in a web page. Silverlight? WPF?
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.