2007-07-11 @ 09:49

icanhasaudio version 0.0.1 has been released!

Hai! icanhasaudio? is an interface to lame for decoding ur MP3s. I iz in ur computer. Decodin ur mp3s.

SYNOPSYS ROFLOL

require ‘icanhasaudio’

reader = Audio::MPEG::Decoder.new File.open(ARGV[0], ‘rb’) { |input_lol| File.open(ARGV[1], ‘wb’) { |output_lol| reader.decode(input_lol, output_lol) } }

Changes:

0.0.1 / 2007-07-10

read more »

2007-07-22 @ 10:59

Sup Bro's

One of the guys at work made this photo for me, and I just have to share it:

Me and Hasselhoff

I’ve been working a lot on some junk, and I’ll write more updates soon!

read more »

2007-07-23 @ 09:23

Streaming KEXP with Ruby

A while back, I ported JustePort from C# to Ruby so that I could play music on my AirportExpress. The result was a library called raop-client. Unfortunately, after writing that, I found that there were no libraries in Ruby to decode MP3s. So I wrote a wrapper around Lame called icanhasaudio. Right now, it only lets you decode MP3s, but I plan on adding new features soon.

So, I decided to write a little program that will stream music from KEXP to my Airport Express.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'rubygems'
require 'raop'
require 'icanhasaudio'
require 'socket'

rd, wr = IO.pipe

decoder = Thread.new(rd, wr) { |read, write|
  reader = Audio::MPEG::Decoder.new
  socket = TCPSocket.new('kexp-mp3-128k.cac.washington.edu', '8000')
  socket.puts("GET / HTTP/1.0\r\n\r\n")
  until(socket.readline == "\r\n"); end
  reader.decode(socket, write);
  write.close
}

sleep 2

raop = Net::RAOP::Client.new('192.168.1.173')
raop.connect
raop.play rd
raop.disconnect
rd.close

decoder.join

I’ll try to explain a little how this works. First I open a pipe which will be used to buffer my decoded mp3. The pipe is passed in to a new thread where my poor mans shoutcast client hooks up to KEXP and starts decoding the mp3 into the pipe.

Meanwhile the main thread waits a couple seconds to make sure there is data in the buffer, connects to the Airport Express, then starts streaming the data from the pipe.

read more »

2007-07-28 @ 21:18

icanhasaudio version 0.0.2 has been released!

Hai! icanhasaudio? is an interface to lame for decoding ur MP3s. I iz in ur computer. Decodin ur mp3s. Whatevs! I also decodin ur OGGz!

SYNOPSYS ROFLOL

require ‘icanhasaudio’

reader = Audio::MPEG::Decoder.new File.open(ARGV[0], ‘rb’) { |input_lol| File.open(ARGV[1], ‘wb’) { |output_lol| reader.decode(input_lol, output_lol) } }

Changes:

0.0.2

  • 1 major enhancement
    • I can has ogg decoder!

0.0.1 / 2007-07-10

read more »

2007-07-30 @ 21:16

Public Apology

Hi everyone. I screwed up, and I need to make a public apology.

After I left work today, someone was kind enough to leave a note for me on my scooter notifying me of my gross incompetence. Here is a photograph of the note:

Note someone left me!

It reads “Please find a scooter-sized Spot. A car could fit.”. It seems as though I carelessly parked my scooter such that a car could not fit in that spot. I was under the impression that the taxes I pay to license my vehicle entitled me to the same benefits a car would have. But I was dead wrong. And I am glad that this kind hearted soul left a note to inform me. As a scooter owner, it is important for me (and all other scooter owners) to realize that street parking is at a premium, and that cars have much higher priority for parking than scooters.

I can’t believe that I would make such a mistake. In addition to being a scooter owner, I am also a car owner! I will make sure that next time I commute to work, I will make sure to take my car - so that I don’t waste precious street space!

Here is a photograph of my scooter that the note was left on:

Orange Dreamcycle

I feel so terrible about the mistake I made that I would love to apologize to the person I inconvenienced in person! Please contact me, or leave a comment, and we can meet up! Make sure to bring measurements of your car so that I will make absolutely sure that there is enough room for you to park.

Next time I drive my scooter I will make sure to constantly check on it so that if any car parking next to it gets up nice and close, so that the general area of my scooter doesn’t look so tempting to another car driver!

read more »

2007-07-31 @ 11:15

今日は猫曜日です。

Sunday was Pam, Ted, and Daisuke’s birthday party BBQ! Stacy and I made a squid cake that shot out ink. We also fed a hotdog to a squirrel. Don’t worry, the hot dog was a veggie hot dog, so I’m pretty sure he liked it.

Check out these fun photos!

IMG_0010.JPGIMG_0044.JPG

This is the awesome hot dog eating squirrel:

IMG_0053.JPG

read more »