>> Hello,
>> I'm writing a VoIP communicator and i need to put digital watermark into
[quoted text clipped - 8 lines]
>
> XOR the 8 bit value with 1.
(1) The OP seems to have trouble with getting the bits themselves. Maybe
if the OP would specify what classes (s)he is using, e.g. AudioInputStream,
it might make the question easier to answer.
(2) I'm guessing the OP doesn't really want to flip the bit, but rather
to hardset it to either 0 or 1, depending on what the contents of the
watermark is. That is, the OP should be overwriting, rather than flipping,
the bit.
- Oliver
sznoorek - 19 Dec 2006 19:10 GMT
Hi,
It's me again! ;o
Oliver was right! I'm having trouble with getting bits themselves - and as
he mentioned I'm using AudioInputStream. :)
Then I would like to set the last bit of the sample frame! I've got hash
function, which result I would like to put to the audio stream as a
watermark.
I've got smth like this:
...
if (target_line.isOpen()) {
audio_input_stream=new AudioInputStream(target_line);
audio_input_stream=AudioSystem.getAudioInputStream(format,audio_input_stream);
--> HERE I would like to get a new input_stream or a byte array,
where in each byte (sample) I need to set the last bit taken from result of
my hash function.
}
...
I will aprreciate Your help!
fsk
Oliver Wong - 19 Dec 2006 20:10 GMT
> I'm having trouble with getting bits themselves - and as he mentioned I'm
> using AudioInputStream. :)
Try going through the tutorial at
http://java.sun.com/docs/books/tutorial/sound/sampled-overview.html
- Oliver