Sha256: c01cca3215fa83d3225f78dfa95e70443829ff526f3c6ba82db3fff9c67a4f1f

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

module Mpg321
  module Control
    module Playback
      def play song
        @loaded = true
        @paused = false
        send_command 'L', song
      end

      def pause
        @paused = !@paused
        send_command 'P'
      end

      def stop
        @loaded = false
        @paused = false
        send_command 'S'
      end

      def paused?
        !!@paused
      end

      def loaded?
        !!@loaded
      end

      def playing?
        loaded? && !paused?
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mpg321-1.0.0 lib/mpg321/control/playback.rb