Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 06:54:38 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Flash dynamic audio sample rate
Pages: [1]
Print
Author Topic: Flash dynamic audio sample rate  (Read 604 times)
SuperDisk
Level 2
**



View Profile
« on: February 27, 2015, 07:52:10 PM »

Hey, I've posted this question a couple of other places but apparently nobody knows the answer. It's sorta game development related, so perhaps one of you guys could shed some light!

As stated on Adobe's page: http://help.adobe.com/en_US/as3/dev/WSE523B839-C626-4983-B9C0-07CF1A087ED7.html

Flash samples audio at 44100hz, which seems pretty standard. I'm using a library to output samples, and I can specify the sample rate it outputs.

Unfortunately, when outputting 44100hz, the music plays at half speed. I can decrease the output of the library to 22050hz and the music plays at the correct speed, but quality is butchered. I've heard other dynamic audio from Flash that sounds good, so what am I doing wrong? Did Adobe just lie in their docs?

Thanks!
« Last Edit: February 27, 2015, 11:15:50 PM by SuperDisk » Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1 on: February 28, 2015, 01:03:58 AM »

Is your source sample stereo? That doubles the samples used at any given frequency. You'd need to drop half, or average them, to get a mono stream.
Logged
SuperDisk
Level 2
**



View Profile
« Reply #2 on: February 28, 2015, 10:09:54 AM »

Sure enough, the library was outputting stereo samples (1 for left, and 1 for right), and I was actually double-writing each sample as left and right simply because I assumed it output mono.

Thanks!  Grin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic