A
Amit Gangrade
Hello Everyone ,
I had written a code for a Simple audio player which takes an audio
file as an input an plays it.
class SimpleAudioPlayer {
.......
.......
public int play(Clip clip,int count) {
clip.loop(count);
return 0;
}
.....
.....
}
the play method is called from the another method which sets up the
audioInputStream and creates a desired clip and then passes it on to
the
play( ) method.
Now I had written another class which acts as a Filter class for
SimpleAudioPlayer class. This class contains a function FilterPlay it
intercepts the calls to the play( ) method. It can change the
arguments of the play( ) method and then pass then on to it.
class FilterSimpleAudioPlayer {
public int FilterPlay(Clip clip,int count) {
....change the argument clip .....
....pass the control to the play( ) function....
}
}
My question has actually nothing to do with the Filtering thing .
my question is how do I change the Clip object in Filter function.
I need to change it to demonstrate the ability of software filtering.
The changes to clip object may be like add echo to the sound,
change the volume, but I dont find a way to do it.
The class FloatControl might do this job but I dont know how to use
it to do this.
any help for the above will be really gr8.
thnx
Amit
I had written a code for a Simple audio player which takes an audio
file as an input an plays it.
class SimpleAudioPlayer {
.......
.......
public int play(Clip clip,int count) {
clip.loop(count);
return 0;
}
.....
.....
}
the play method is called from the another method which sets up the
audioInputStream and creates a desired clip and then passes it on to
the
play( ) method.
Now I had written another class which acts as a Filter class for
SimpleAudioPlayer class. This class contains a function FilterPlay it
intercepts the calls to the play( ) method. It can change the
arguments of the play( ) method and then pass then on to it.
class FilterSimpleAudioPlayer {
public int FilterPlay(Clip clip,int count) {
....change the argument clip .....
....pass the control to the play( ) function....
}
}
My question has actually nothing to do with the Filtering thing .
my question is how do I change the Clip object in Filter function.
I need to change it to demonstrate the ability of software filtering.
The changes to clip object may be like add echo to the sound,
change the volume, but I dont find a way to do it.
The class FloatControl might do this job but I dont know how to use
it to do this.
any help for the above will be really gr8.
thnx
Amit