BUG Community

Welcome! Log In

Forums Applications Choppy audio playback

Subscribe to Choppy audio playback  7 posts, 5 voices , Tagged: Sound audio

Log in to reply to this topic
Aug 21, 2010 12:42pm
Medium kkillebrew 2 posts

I just wrote an app, uploaded as MotionTriggeredSound, that plays an audio file in response to motion events, using IModuleAudioPlayer.  However, the audio playback is very choppy, and if left running long enough, will freeze the system.  I used the .wav file from AudioModuleButtonTester (signed 16 bit, little endian, 44.1 kHz).

I tried converting the file to big endian using sox, but then I get no audio playback at all.

Any suggestions/assistance would be appreciated.  :-)


Aug 30, 2010 8:44pm
Medium Bug Labs team jconnolly 285 posts

Have you had a look at Phunky?  It preloads a byte-array of the raw-encoded audio, I believe so that the read-latency is reduced.  I think the playback API is a bit clunky for an embedded system. 

Have you also tried comparing the playback to the playback via command-line aplay?  This will help narrow down whether it’s a problem with java decoding the wav data and playing it back as opposed to something bottlenecking at the codec/driver level.

Sep 9, 2010 4:00pm
Medium kkillebrew 2 posts

Thanks for the reply!

The first thing I tried to do with the audio module was to use aplay, but it reports “device or resource busy” on my BUG (running R1.4.3).  As the wiki page for using aplay seems to have been written for R1.2, I’m guessing the new sound API might be keeping the sound module preoccupied.

While tinkering with a different embedded audio project, I tried playing back a sound file that exceeded the supported bit rate and discovered I would get choppy playback similar to what I’m getting from the BUG.  So, I tried reducing the bit rate on the sample file for the BUG.  As the I2C bus connnecting the module to the base has a maximum rate of 400kbits, I tried using a 22 kHz, 16-bit mono .wav file, for a bitrate around 350kbits.  However, the lower bitrate file still sounded choppy.  The period of the “chops” seemed shorter, though.

Perhaps buffering the file like Phunky does would get things going properly.  Thus far it has been beyond my coding-fu to figure out how much of what Phunky does is because it is sampling raw audio, and how much is for buffering the audio stream.  I wonder if the bitmask business would still be necessary with a 16-bit .wav file.


Sep 9, 2010 4:10pm
Medium Bug Labs team jconnolly 285 posts

Hmm yeah, the “device or resource busy” part is because the jvm has opened the alsa device for the module.  If you stop the jvm then you should be allowed to use aplay to play to that sink. 

I’ll ask Dave Findlay what his take on how much of it is due to being raw-encoded audio and how much is to get around the buffering problem.

Aug 14, 2012 1:55am
User_img_not_found_06_med rubing 103 posts

Isn’t it funny how we www.coachfactorystoreec.com/ Coach Factory Store always want what we can’t have? The girl with the round and pert backside wishes that her rear were 5 times smaller. Meanwhile, the girl with the non existent posterior wishes to achieve a larger butt. Well, if the grass is greener on the other side, just water yours! If you’ve got a small behind, you can create the illusion of a larger one with butt enhancing jeans. Here’s how to do it. Look for light weight denim – This material is very stiff and heavy. If you try to stuff a flat butt into denim jeans, it will only create a flatter looking behind. A little stretch goes a long way – Your butt enhancing jeans should additionally contain some stretch. A mixture of 98 percent cotton and 2 percent lycra is best. This combination of lycra and cotton, especially when it’s in a nice tight-weave fabric that’s fitted through the hip and thigh area will help lift your buttocks. Too much lycra and your jeans may start to ripple like a pair of leggings. If there’s not enough cotton content, there won’t be enough structure to hold you up. It’s all in the pockets – The most effective trick for creating the illusion of a bigger butt is to choose jeans with flap pockets. The added bulk of the flap will enhance and add dimension to your tiny tush. True Religion is notoriously famous for their flap pocket designs. You can also try Hudson, Rock & Republic, Frankie B and Paige for addition flap pocket styles. Pocket placement – If you’re not a fan of flap pockets, or if you’ve already bought too many of them, you can also try denim with regular pockets. Be sure to aim for a pair with smaller pockets that sit higher and this will help make your rear look lifted. Cut is also important – Look for jeans with a slight tapering at www.coachfactoryonliness.com/ Coach Factory Online the knee, such as a straight leg or skinny style. This cut will make your bum look a bit larger in comparison to the rest of your body. Great styles to try are True Religion Billy, Julie or Stella, Siwy Harmah or Rose, and Hudson Emily or Paige. How low can you go – Actually, you don’t want to go too low when it comes to the jean rise. The goal is to project more, not less. A pair of low rise denim will only reduce the size of your rear. Instead, opt for a pair with a medium rise. Color me right – Since dark colors minimize, dark denim and indigo will create a slimming effect. You do not want this kind of effect on your barely there behind! Try to find light colored or medium blue denim. Grey is very flattering and will also work. Like a great bra, butt enhancing jeans can also lift and www.coachfactoryoutletusa.com/ Coach Factory Outlet separate what little you have. So it wasn’t in your genes to have a nice, round bottom. Big deal. Be happy with what you’ve got and just improvise!

Aug 17, 2012 8:22pm
User_img_not_found_05_med shenghuo 86 posts

http://www.greatlouisvuittonsbags.com/ louis vuitton Handbags
http://www.louisvuittonpursebags.org/ Louis Vuitton Bags
http://www.louisvuittonsonlineshop.org/ Louis Vuitton Outlet Online
http://www.hermesoutletsus.net/ hermes outlet
http://www.cheap-suprashoe.net/ cheap supra shoes
http://www.officiallouisvuittonzones.net/ louis vuitton outlet

Sep 2, 2012 9:57pm
User_img_not_found_02_med yeti531 28 posts

designer handbags
’ quality is very good, the materials are the same as the
genuine brand handbags, and its production and processing processes are in
strict accordance with the process of genuine production. we guarantee the best
quality, newest design, and cheapest price cheap handbags. Welcome to
our online sales shop, where you can always buy the most affordable price to a
your favorite handbags Wholesale

Log in to reply to this topic
Forums Applications Choppy audio playback

Powered by Community Engine