Changeset 2581
- Timestamp:
- 05/12/08 22:45:58 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/Scripts/Audio_scripts/Repository/Main.pm
r2422 r2581 51 51 # update properties 52 52 $command = ("svn propset -R sampling_rate_Hz $downsample_rate $path_main/$audio_dir_name"); print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; 53 $command = ("svn propset -R bits_per_sample $downsample_bits_per_sample $path_main/$audio_dir_name" ); print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; 53 $command = ("svn propset -R bits_per_sample $downsample_bits_per_sample $path_main/$audio_dir_name" ); print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; 54 # !!!!!! 55 if ($readme->getChannels() > 1) { 56 $command = ("svn propset -R number_of_channels:1" ); print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; 57 } 58 # !!!!!! 54 59 $command = ("svn update -r HEAD $path_main/$audio_dir_name");print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; 55 60 $command = ("svn commit -m \"downsampled $audio_dir_name audio files & updated properties\" $path_main/$audio_dir_name"); print "$command\n" if $debug; system($command) == 0 or confess "system $command failed: $?"; Trunk/Scripts/Audio_scripts/UserSubmission/README.pm
r2520 r2581 105 105 $readmecontents{'samplingrate'} =~ s/441/44\.1/g; 106 106 $readmecontents{'samplingrate'} = $readmecontents{'samplingrate'} . "kHz"; 107 # print "Samplingrate:$samplingrate\n" if $debug;108 107 } elsif ($line =~ /Sample rate format:/i) { 109 108 $line =~ s/ //g; # remove spaces … … 112 111 $readmecontents{'samplingrateformat'} =~ s/\D//g; # removes anything other than a digit 113 112 $readmecontents{'samplingrateformat'} = $readmecontents{'samplingrateformat'} ."bit"; 114 # print "Samplingrateformat:$samplingrateformat\n" if $debug; 113 } elsif ($line =~ /Number of channels:/i) { 114 ($title, $readmecontents{'channels'}) =split(/\:/, $line); 115 $readmecontents{'channels'} =~ s/ //g; # remove spaces 115 116 } elsif ($line =~ /Pronunciation dialect:/i) { 116 117 ($title, $readmecontents{'dialect'}) =split(/\:/, $line); 117 118 $readmecontents{'dialect'} =~ s/^ //g; # remove leading space 118 # print "dialect:$dialect\n" if $debug;119 119 } elsif ($line =~ /File type:/i) { 120 120 $line =~ s/ //g; # remove spaces 121 121 ($title, $readmecontents{'filetype'}) =split(/\:/, $line); 122 122 $readmecontents{'filetype'} = lc $readmecontents{'filetype'}; #lower case 123 # print "filetype:$filetype\n" if $debug;124 123 } elsif ($line =~ /Language: /i) { 125 124 # $line =~ s/ //g; # not required … … 188 187 return $self->{'contents'}; 189 188 } 189 190 sub getChannels { 191 my $self = shift; 192 return $self->{'channels'}; 193 } 190 194 1;