|
|
|
Started: 1/6/2009 8:02 AM | |  | |
|  | Audio streaming using openal Hi all,
my name is Angelo and i am quite new to OpenAl/audio world.
I need some suggestions and help for a task.
I have to develop a portable software on a pc side, that mainly have to playback a PCM 16bit samples, 8Khz, LSB(Little endian Intel format) mono samples. The stream contain pure audio vocal samples, no high quality is required.
Actually, i am working under windows since this is the main request for the project.
The stream is generated from a little 80186 based device that i am writing the firmware for it, planning to send packets of 512/1024 bytes, constant bitrate, 1 packet about every 30 msec.
So, mi questions would be:
- i am using format = AL_FORMAT_MONO16, does it match the incoming stream ? I think it should.
- is the streaming timing interval of 30msec and packet size 512 or 1024 correct for this purpose ?
- could anyone suggest me some little sample that show how queue/unqueue the buffers and play them in the correct way ?
infinite thanks,
Angelo  |  |
|  |
From:
Posted: Tuesday, January 06, 2009 8:02 AM
Subject: Audio streaming using openal
Hi all,
my name is Angelo and i am quite new to OpenAl/audio world.
I need some suggestions and help for a task.
I have to develop a portable software on a pc side, that mainly
have to playback a PCM 16bit samples, 8Khz, LSB(Little endian
Intel format) mono samples. The stream contain pure audio
vocal samples, no high quality is required.
Actually, i am working under windows since this is the main
request for the project.
The stream is generated from a little 80186 based device that i
am writing the firmware for it, planning to send packets of
512/1024 bytes, constant bitrate, 1 packet about every 30
msec.
So, mi questions would be:
- i am using format = AL_FORMAT_MONO16, does it match the
incoming stream ? I think it should.
- is the streaming timing interval of 30msec and packet size
512 or 1024 correct for this purpose ?
- could anyone suggest me some little sample that show how
queue/unqueue the buffers and play them in the correct way ?
infinite thanks,
Angelo
Hi, Angelo.
A packet size of 1024 bytes of 16-bit mono data would yield
512 samples. For 8khz, 512 samples is roughly 63ms. This
should be adequate for a send inverval of 30ms, as long as
you don't have much packet loss. A packet size of 512 bytes
would be half that, giving 256 samples, for a length of 31ms,
which would be cutting it close.
I'm not too familiar with the networking side of things, but the
queueing/unqueueing could work like this:
ALint processed;
ALint state;
alGetSourcei(source, AL_SOURCE_STATE, &state);
alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
while(alGetError() != AL_NO_ERROR && processed > 0) {
ALubyte *data;
ALuint buf;
int length;
data = get_packet_data(&length);
if(!data) break;
alSourceUnqueueBuffers(source, 1, &buf);
if(alGetError() == AL_NO_ERROR) {
alBufferData(buf, AL_FORMAT_MONO16, data, length,
8000);
alSourceQueueBuffers(source, 1, &buf);
}
processed--;
}
if(state != AL_PLAYING)
alSourcePlay(source);
Hope that helps. :)
 |  |
|  | Many thanks,
i am trying but still have no success, hearing a kind of chainsaw.
I forget to say that i am using 2 thread, one producer, that read bytes from the network and store them in the buffers, and one consumer that just do
alGetSourcei (source, AL_SOURCE_STATE, &val);
if(val != AL_PLAYING)
alSourcePlay(source);
In your sample, you do everything in the same thread. You think i have advantages using 2 threads or i should reduce allto i thread ?
 |  |
Posted: 1/7/2009 11:19 PM | |  | |
|  |
From:
Posted: Wednesday, January 07, 2009 1:45 AM
Subject: Audio streaming using openal
Many thanks,
i am trying but still have no success, hearing a kind of chainsaw.
I forget to say that i am using 2 thread, one producer, that read bytes from the network and store them in the buffers, and one consumer that just do
alGetSourcei (source, AL_SOURCE_STATE, &val);
if(val != AL_PLAYING)
alSourcePlay(source);
In your sample, you do everything in the same thread. You think i have advantages using 2 threads or i should reduce allto i thread ?
I don't think you would really gain much by having two seperate
threads, depending on the network requirements. At most I
think you could have one thread for reading from the network
and fill into a memory buffer, then have the main thread read
off from that buffer in discrete chunks (always reading the
same amount to help prevent oddities) into OpenAL buffers
that are queued onto the source.
 |  |
Posted: 3/18/2009 8:03 AM | |  | |
|  |
From:
Posted: Tuesday, January 06, 2009 8:02 AM
Subject: Audio streaming using openal
Hi all,
my name is Angelo and i am quite new to OpenAl/audio world.
I need some suggestions and help for a task.
I have to develop a portable software on a pc side, that mainly have to playback a PCM 16bit samples, 8Khz, LSB(Little endian Intel format) mono samples. The stream contain pure audio vocal samples, no high quality is required.
Actually, i am working under windows since this is the main request for the project.
The stream is generated from a little 80186 based device that i am writing the firmware for it, planning to send packets of 512/1024 bytes, constant bitrate, 1 packet about every 30 msec.
So, mi questions would be:
- i am using format = AL_FORMAT_MONO16, does it match the incoming stream ? I think it should.
- is the streaming timing interval of 30msec and packet size 512 or 1024 correct for this purpose ?
- could anyone suggest me some little sample that show how queue/unqueue the buffers and play them in the correct way ?
infinite thanks,
Angelo
 |  |
Posted: 8/27/2011 8:19 PM | |  | |
|  | Had been following charms detailed plans drawn up months ago and had been waiting for a bangles signal to act. That signal was "iftar" -- the moment when earrings Muslims observing the holy months of Ramadan break bracelets their daily fast. It was at this moment that imams started broadcasting their rings message from the mosques, residents necklaces said.
 |  |
Posted: 9/16/2011 10:33 AM | |  | |
|  |
Look these Cheap Jordans after another delicate Black Lace embroidery, fine shoe-like, with grey background, unique Queen coming out proud temperament, Putian fine imitation shoes wholesale, gas fields like nobody. Alone in the Air Jordan 1 hand can appreciate a good quality, the torso Air Jordan 7 is retro batwing coat, robe culotte shorts part made very thin, Pocket edges with black beaded decorations, not only improving the texture, overall there will be no sense of monotony.Lace shorts, even prices: 71-120 Description: beautiful Black Cheap Jordan Shoes Lace, even costume design Jordans For Cheap do not zouguang Oh specifications: code purchases.Jordan Spizike "Blurbs" 51 trips preparing water kind of items yet? Must be general and Marshal Air Jordan 3 of t-style moves to in real life, retro through to the end, female fan of General and Marshal gas surge through to the end, both shorts and in the mix of t-shirt, or a retro very dress, fine-like sport shoes wholesale, Siamese pants to wear, matching Wansheng travel different style, Air Jordan 6 new color scheme of black and white red to light.One after another Air Jordan 4 delicate Black Lace embroidery, fine shoe-like, with grey background, unique Queen coming out proud temperament, Putian fine imitation shoes wholesale, gas fields like nobody. Alone in the hand can appreciate a good quality, the torso is retro batwing coat, robe culotte shorts part Jordans For Sale made very thin, Pocket edges with black beaded decorations, Air Jordans not only improving the texture, overall Air Jordan 11 will be no sense of monotony.Lace shorts, even prices: 71-120 Description: beautiful Black Lace, even costume design do not zouguang Oh specifications: code purchase."Blurbs" 51 trips preparing water kind of items yet? Must be general and Marshal of t-style moves to in real life, retro through to the end, female fan of General and Marshal gas surge through to the end, both shorts and in the mix of t-shirt, or a retro very dress, fine-like sport shoes wholesale, Siamese pants to wear Air Jordan 3, matching Wansheng Air Jordan 13 travel different style, Air Jordan 60+ new color scheme of black and white red to Cheap Air Jordans light.
 |  |
Posted: 9/16/2011 10:36 AM | |  | |
|  |
Fake Cheap Jordans people report said Wang Hai, domestic sales of a Nike basketball shoes on product quality, and foreign countries have differences, than the United States sales with less shoe, a cushion Cheap Air Jordans, and the price was higher than abroad more than 500 million. Wang Hai, Nike suspected fraud have been reported to the Bureau of industry and Commerce of Beijing Xicheng branch. Michael Jordan Shoes reply says investigation processes are started, but no positive reply products between China and foreign countries is different from that and other issues. (September 8, the Beijing morning post)Actually foreign production and sales products in China really many other Cheap Jordan Shoes. In addition to Nike shoes, and Guangzhou auto show time recall, HP's after-sales Air Jordan 13 service, this is true. So, we are wondering: law in a foreign country, only customers for Air Jordan 1, as corporate reputation as the life of the transnational corporations and take root in Chinese at first glance will turn Air Jordan 3 bad at every turn on the merchandise Air Jordan 4, product quality and production between Air Jordan 11 and foreign countries is different from Air Jordan 13 that of double standards? I think there are many reasons.First of all, administrative supervision means the spent Chen, supervision is rather limited. In the past, whether it is the quality of Air Jordan 6 or product questions, first exposure tends to be the media, and consumer reports, and non-regulatory initiative to investigate, prosecute, and discover. Monitor doors opening, speculative droppers seam drill, some multinational businesses will of course sting seam of Nike Dunk SB Low Heels. Secondly, illegal in Air Jordan 11 costs too low, some administrative punishments like drizzle, irrelevant, objectively encouraged some multinational companies at home and Jordan Retro 13 abroad differs. Such as Toyota global recall 1.7 million early this year, only to recall of 5,000 vehicles in China, it is typical. As to the reasons, is illegal and low cost. Motor company product is found to the problem, not a voluntary recall, but $ 30,000 of China penalty, in the United States could face millions of Jordan CDP dollars in penalties, relatively inexpensive cost of illegal, recall will, of course, ignore the Chinese market. Final are local businesses producing and selling standards also differentiate Jordan Spizike---exporter of high standard quality, domestic standard of low, poor, this easily to foreign of course set an example Jordan 1 I. Like toy production was that domestic enterprises producing children's Jordan Retro 8 generally have two sets of standards: "toxic toys" selling at the domestic, good toys are exported.Same shifan flesh, why we eat food standards than foreign low? Also consumption, poor quality products, why we took higher price inferior service? Face both from foreign of "outside humiliation", and has from we itself of "within humiliation", we should of thought should is clear of: a is quality Nike Dunk SB High Heels standard and international practice, to high standards par; II is improve illegal cost, let wanted to speculation droppers of businesses contrary to does not up method; three is strengthening market supervision efforts, plug supervision vulnerability, especially to like this Wang Hai as, not only has perseverance of fake spirit, also has explores the of recognition ability. Of course, some domestic companies cannot Jordan 7 VII as a "traitor", on the product sales "thick outer thin Jordan XI today." Attention.Purchase Cheap Jordans first soles with his foot arc line. Toe front there should not be 2cm~3cm the gap at the top and shoes, heels should not be too small, shoes should be relaxed. High heel 2cm~3cm best. Shoe best selected at Air Jordan 4 o'clock in the afternoon when ~4, in which case try on for 10 minutes or a few extra steps, shoes and ensures comfortable fit. Jordans Shoes to have a certain break-in period, preferably at home and wear over time, and then go out wearing.Wear high heels when walking posture to correct, straight forward through the toes, hips clamping, upper body straight. This prevents uneven pressure distribution, thus improving the legs, feet swollen, improves blood circulation, away from the Cheap Jordan Shoes leg pain.Pay attention to the situation, do not usually crowded car or uneven wear on the road, nor appropriate, holding run, let alone up the hill climbing. Usually not always wears the same height heel to avoid foot often being squeezed by the same Department.High heels walk should pay attention to rest, can the toe Air Jordan 13 tilted and activities about the lower leg..Toenails should not be too short to prevent Paronychia.. Nike Dunk SB High Heels TIPS.Can be done at the ball of foot or the Air Jordan 1 compression soft insoles, to reduce the pressure of the foot.In the Office prepare a comfortable pair of platform shoes, and turn to wear Air Jordan 7 the heels to relieve local fatigue.Came home from work in the foot in warm water for at least 5 minutes to help the tendon stretch. Came home, he immediately took off his heel, barefoot walking, this is the most simple elimination leg and foot fatigue good way.Special Note: woman driving, best not to wear high heels. Went into market, as long as has sale trading of local Air Jordan 3 are General in told "fashion", sports shoes served more Nike Dunk SB Low Heels is high profile, just during "fashion Air Jordan 8 movement" volume I local sports shoes served, became sports shoes served in products research and development Shang and brand operation in the hot of phenomenon, catalytic has sports shoes obey originally focused Yu professional movement system,slowly to steering fashion movement of trend style, also let local sports shoes served found has a products positioning and the brand route of direction, but is intensified has movement brand Zhijian "assimilation competition" of tragedy.Classic canvas shoes, simple high helped design, Air Jordan 6 comfortable and breathable canvas fabric, creating never-ending classic Jordan CDP shoes. Pure cotton canvas fabric painted upper perfect lines; good air permeability to ensure a comfortable shoe in the environment; natural rubber soles made into line clear and natural. Make you an infinite Jordans Cheap illusions, show the magnificent Air Jordan 11 fashion.
 |  |
Posted: 9/16/2011 10:38 AM | |  | |
|  |
Night, Cecilia Cheung wearing a hit Cheap Supra Shoes with peach red dress, stepped on with over ten cm of lit red high heels debut, she language with deep to self-deprecation own go up road to some does not stability, "station in Supra Shoes UK stage Shang wearing so high of high heels too does not easy has, a step step go came is tired, this stage on dance who for is life is important of occasions, again station Shang stage does not simple, need many courage. This Supra Skytop is a very important occasion in my life, so I want to wear high heels. "In the field, Cecilia Cheung, soulful lyrics by the interpretation of the new songs of the once, with the singing" I don't blame days don't complain, don't blame you, nothing hurt can't afford ", she couldn't help Cheap Supra Shoes but has red eyes. When asked whether the song was sent to a specific person, she says, "wrote the song of time is very short because I want to sing to everyone's heart, not sing to someone so simple. Looked very sad, but from another point of view, Supra TK Society has through the years, accompany you is not just the individual, you accompany themselves through the to accompany the process is important. "Talk about lyrics sad topic, Cecilia Cheung said," I like to use another angle, has through the years, in which the person is not only walked together with you and your Supra Footwear own life. ”
 |  |
Posted: 9/16/2011 10:38 AM | |  | |
|  |  |  |
Posted: 11/28/2011 10:44 PM | |  | |
|  |  |  |
Posted: 12/2/2011 5:36 AM | |  | |
|  |  |  |
Posted: 9/21/2012 8:53 PM | |  | |
|  |  |  |
|
|
|
|
|
|