Browse files

Cleaned up the docs

  • Loading branch information...
1 parent 97a63d4 commit f2dab7b7dffd2d2e724979f7ac7ef6444e5478b4 @kthakore kthakore committed Sep 13, 2010
Showing with 43 additions and 125 deletions.
  1. +10 −92 lib/pods/SDLx/Sound.pod
  2. +33 −33 t/sdlx_sound.t
View
102 lib/pods/SDLx/Sound.pod
@@ -1,18 +1,11 @@
-package SDLx::Sound;
-
-use SDL;
-use SDL::Audio;
-use SDL::Mixer;
-use Carp ();
=head1 NAME
SDLx::Sound
-=head1 VERSION
-
-Version 0.01_01
+=head1 CATEGORY
+Extension
=head1 SYNOPSIS
@@ -104,104 +97,29 @@ Each sound will play in the next available channel, so it can be handled isolate
Returns a new instance of SDLx::Sound
-=cut
-
-sub new {
- my $class = shift;
- my $self = {@_};
- bless ($self, $class);
- return $self;
-}
-
=head2 load
-=cut
-
-sub load {
- my $self = shift;
- my $self->{file} = $_[0];
- warn "Loadind ". $self->{file} ."\n";
-}
=head2 play
-=cut
+ $sdlx_sound->play('file.wav');
-sub play {
-}
+Play a file
-=head2 loud
+=head2 pause
-=cut
-
-sub loud {
-}
+=head2 resume
=head2 stop
-=cut
-
-sub stop {
-}
-
-
-=head1 AUTHOR
-
-Monsenhor, C<< <ricardo.filipo at mitologica.com.br> >>
-
-=head1 BUGS
-
-Please report any bugs or feature requests to C<bug-sdlx-sound at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDLx-Sound>. I will be notified, and then you'll
-automatically be notified of progress on your bug as I make changes.
-
-
-
-
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
- perldoc SDLx::Sound
+=head1 AUTHORS
-You can also look for information at:
+See L<SDL/AUTHORS>.
-=over 4
-
-=item * RT: CPAN's request tracker
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=SDLx-Sound>
-
-=item * AnnoCPAN: Annotated CPAN documentation
-
-L<http://annocpan.org/dist/SDLx-Sound>
-
-=item * CPAN Ratings
-
-L<http://cpanratings.perl.org/d/SDLx-Sound>
-
-=item * Search CPAN
-
-L<http://search.cpan.org/dist/SDLx-Sound/>
-
-=back
-
-
-=head1 ACKNOWLEDGEMENTS
-
-
-=head1 LICENSE AND COPYRIGHT
-
-Copyright 2010 Monsenhor.
+=head1 COPYRIGHT & LICENSE
This program is free software; you can redistribute it and/or modify it
-under the terms of either: the GNU General Public License as published
-by the Free Software Foundation; or the Artistic License.
-
-See http://dev.perl.org/licenses/ for more information.
-
+under the same terms as Perl itself.
-=cut
-1; # End of SDLx::Sound
View
66 t/sdlx_sound.t
@@ -8,13 +8,13 @@ BEGIN {
exit(0);
}
- use Test::More tests => 7;
+ use Test::More tests => 7;
use lib 't/lib';
use lib 'lib';
- use SDL;
+ use SDL;
use SDL::TestTool;
- use SDL::Config;
- use SDLx::Sound;
+ use SDL::Config;
+ use SDLx::Sound;
$audiodriver = $ENV{SDL_AUDIODRIVER};
$ENV{SDL_AUDIODRIVER} = 'dummy' unless $ENV{SDL_RELEASE_TESTING};
@@ -32,16 +32,16 @@ my $fase2 = 0;
# methods
can_ok(
- 'SDLx::Sound', qw/
+ 'SDLx::Sound', qw/
new
- load
- unload
- play
- stop
- loud
- fade
+ load
+ unload
+ play
+ stop
+ loud
+ fade
/
-);
+ );
ok (my $snd = SDLx::Sound->new(), 'Can be instantiated');
ok (my $snd2 = SDLx::Sound->new(), 'Can be instantiated again');
@@ -54,28 +54,28 @@ ok ($snd->play('test/data/sample.wav'), 'Can play a wav');
SKIP:
{
-skip 'complex tests', 1 unless $fase2;
+ skip 'complex tests', 1 unless $fase2;
# in a single act do the wole Sound
-ok( my $snd2 = SDLx::Sound->new(
- files => (
- chanell_01 => "test/data/sample.wav",
- chanell_02 => "test/data/tribe_i.wav"
-
- ),
- loud => (
- channel_01 => 80,
- channel_02 => 75
- ),
- bangs => (
- chanell_01 => 0, # start
- chanell_01 => 1256, # miliseconds
- chanell_02 => 2345
- ),
- fade => (
- chanell_02 => [2345, 3456, -20]
- )
-)->play()
-);
+ ok( my $snd2 = SDLx::Sound->new(
+ files => (
+ chanell_01 => "test/data/sample.wav",
+ chanell_02 => "test/data/tribe_i.wav"
+
+ ),
+ loud => (
+ channel_01 => 80,
+ channel_02 => 75
+ ),
+ bangs => (
+ chanell_01 => 0, # start
+ chanell_01 => 1256, # miliseconds
+ chanell_02 => 2345
+ ),
+ fade => (
+ chanell_02 => [2345, 3456, -20]
+ )
+ )->play()
+ );
}
#diag( "Testing SDLx::Sound $SDLx::Sound::VERSION, Perl $], $^X" );

0 comments on commit f2dab7b

Please sign in to comment.