Wednesday, February 17, 2016

Lightworks Audio Problems - Android Tutorial #24: SoundPool (3/3) ; Volume Control with AudioManager

Lightworks Audio Problems




This is a short video showing the problems I'm having
with Lightworks.
The audio is choppy if I use any of the videos, including
EyeConverter.
This is the origianl audio as captured by FRAPS.
This is the one that's converted by Lightworks (EyeConverter)
This is converted to MP3 by VLC
Annnnd this is what happens when you convert it with VLC to MP4
As you can see they pretty much all sound the same.
Continuing on, I've brought all these elements into Lightworks
And I've brought up the audio mix panel
So that we can see some problems.
First we'll go to the original. If I play it shows...
Do you hear the ticking?
Ok, so that's driving me nuts.
So then I used EyeConverter which everyone suggested.
Its crackling now.
So then I said, 'Let me convert it with VLC!' to many
different formats. All of which never worked (on import).
And then following, I just converted it to an MP3 and imported it directly.
And here we have exactly what the audio is suppose to sound like.
So clearly there's a problem with Lightworks somewhere that I have
absolutely no clue how to get around except for
ripping the audio out and then bringing it back together in Lightworks.



Android Tutorial #24: SoundPool (3/3) ; Volume Control with AudioManager




so we're playing sound effects that's
great but what about volume control
you may want to allow users to
control the volume
your application to here are some keyboard
shortcuts for the
emulation of devices mall in control on
the emulator
and currently on map is up and running
and let's use one of those
shortcuts but if you notice the little
icon there is a bell
and that's be from ringer that's not the
same
as the following if your application you
need to link your ap
to your physical buttons and this is how
you do it so if we look at me
main activity and take a look at the on
crane method
this is the lawn you need
to connect your physical buttons to: ap
volume
control setúbal in control stream who'd
you manager
talk stream music and if we should save
and run
if we now
emulate the volume control CDI
constraints
that's because men are controlling the
volume of the app let's put on full
volume
that's the full volume and let's reduce
in
to look but
you conceive in the following is being
controlled but what if you want to play
sounds and different millions well
I've created another bus the cold
calling low and we can use the app to
trade
the same sound but a slow volume let's
go back to our main activity class
very top at the class level needed to
find a few more things
we're going to manage the sounds manage
the audio
we're gonna need in Aldean manager so
we've created in hoodia manager and
we've got
some floating values go a value
here that will represent the current
volume and the value that represents the
maximum volume
and also a third floating body called
volume
and this will represent are current
volume
as a decimal between 0&1 the format that
the sound
pool needs and we calculate that by
using these two values
all shaven in just a moment let scroll
down in 12 on create
matters here the two-member math is the
week raised in Los tutorials
I'm going to add a third one going to
call it volume
sounds and its red because we haven't
defined a.m.
I'm just about to them so here's on
method mold him sounds
and when it's called we can all do you
manage your objects
we then ask fall the current
Molly M we seventy current
our current on variable we do the same
for the maximum volume in the device
and we set up the maximum volume and his
the calculation I mentioned
we sent volume by
the ratio these two values and other
current stain
if you use the value stored in volume
you get the same level
volume as the device let's apply this to
the sound pool
we scroll down to the bottom of this
created you can catch up on buttons in
the previous tutorials
well his the Queen sound person we had
in the last tutorial
are low sound button just copy this
paste and mud flying up
remember these first two numbers
represent
the volume this one's for the left only
going 70
volume will make a small valley divided
by a
I'm do the same for the right volume are
no two studies a que statements
we need to we need a break in each one
so
break break
prick
when the low sound button is pressed the
sound cool
here will play the sound ID for the coin
to open the coin sound
on a volume eight times less mine
20 buttons will have different volumes
let its a man run this
here are the two buttons
safe week going up at a nice loud
sound pic when low ok it tonight
the volume psych cleanup
Queen low and weaken
can reduce the several sounds and ratios
will adjust accordingly
so Queen up will be a bit quieter now
and Queen loan
even quieter it's taken down
been further so clean up
and Queen low
Queen low can barely be heard
and I that if this tutorial thanks for
watching
do
%uh

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.