Hi all

When i create a new audio file and try to play, it stops after going to cirtain point and does not play fully. Am i missing something here?

Thanx

Comments

a.k.karthikeyan’s picture

I jst tested it on windows machine and its working properly there . I tried using firefox and IE and its working well . May be its the problem with the flash plugin. I am using suse 10.0 with firefox.

q0rban’s picture

Are all those computers on the same network? If not, it might be a bandwidth issue on the suse machine...

a.k.karthikeyan’s picture

In the same network...

a.k.karthikeyan’s picture

All the computers are on the same network...

luperry’s picture

I'm having the same problem as well. this seems to be a bug in the XSPF Button Player. XSPF Slim and XSPF Extended are fine.

drewish’s picture

ron collins’s picture

are there explicit instructions on how to change players somewhere? i can only find docs saying it is possible in the theme layer.

ron collins’s picture

i figured it out so i thought i would post details here.

other players are available at http://musicplayer.sourceforge.net/
download one into your modules/audio/players dir and make the new player exicutable.

in the audio.theme, change:

//$url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/mp3.swf';
$url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/xspf_player_slim.swf';

and
//$output = '

'; $output = '';
q0rban’s picture

Hi elraun..

fyi, you don't want to modify the audio.theme file.. if you do, you'll have to keep making your changes any time you install a new version of the audio module.. instead, copy the theme_audio_mp3_player() function and paste it into your theme's template.php file (or the theme's .theme file, if you are using a non-phptemplate theme) and rename it to mytheme_audio_mp3_player() where 'mytheme' is the name of the theme.. if the template.php file doesn't exist in your theme's folder, create it...

then make the appropriate changes to your new function, and voila!


<?php
function mytheme_audio_mp3_player($node, $options = array()) {
  global $base_url;

  // flash only supports a limited range of sample rates.
  switch ($node->audio_fileinfo['sample_rate']) {
    case '44100': case '22050': case '11025':
      break;
    default:
      return;
  }

  $options = array_merge((array) $options, array(
    'song_url' => $node->url_play,
    'song_title' => $node->audio_tags['title'],
  ));

  $params = array();
  foreach ($options as $key => $val) {
    $params[] = rawurlencode($key) .'='. rawurlencode($val);
  }

  $url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/xspf_player_slim.swf';
  if ($params) {
    $url .= '?'. implode('&amp;', $params);
  }

  $output = '<object type="application/x-shockwave-flash" data="'. $url .'" width="17" height="17">';
  $output .= '<param name="movie" value="'. $url .'" />';
  $output .= '<param name="wmode" value="transparent" />';
  $output .= '</object>';

  return $output;
}
?>
q0rban’s picture

Status: Active » Closed (won't fix)
q0rban’s picture

Title: audio stops automatically » Intermittent playback - SUSE Firefox
ron collins’s picture

thanks for that q0rban. much cleaner. i know i'm supposed to do it like that but sometimes it isn't clear where exactly to put the function. it's done and working nicely now.

perhaps the thin version of the player should come with the audio module as the default until the bug in the button version is available?

drewish’s picture

unless we get a lot more people running into this bug i don't think we'll be switching the player. we're already running a non-standard version of the button player as it is.

luperry’s picture

I found this problem is more likely to occur when my computer is under heavy load. If I close some of the background programs, and stop everything I'm doing, it's very likely it'll play to the end.

I'm not sure if this is the case for everyone else.

zirafa’s picture

Yep, this happens probably to everyone. My guess is that the flash player isn't very high on the priority list, so if other applications need CPU/and, bufferspace, or sound devices it'll temporarily halt playback. I know if I have a flash player playing some music and then I launch a large application like Photoshop it'll sputter.

luperry’s picture

Well, with other applications, the sound might get choppy or skips a beat or two under heavy load, but the button player just stops playback totally and completely.

q0rban’s picture

luperry.. sounds like you are using Fx on SUSE as well?

As I understand it, this issue is only for playback issues with SUSE and Firefox.. Any other problems with playback on other OSes is most likely due to processor/memory overload as described by zirafa above, and doesn't really fall under the scope of this issue..

I've used the flash player on Mac OS, Windows, & Debian, all with no troubles, and would venture to say the first two are used by 99% of the population..

cheers..

luperry’s picture

I'm using Gentoo Linux with Firefox. I suspect it might have something to do with the binary flash plugin on linux.

luperry’s picture

never mind, I take that back, I missed the "Debian" part on your post.

I forgot to mention, I also tried it on windows with vmware, and I experienced the same issue. So maybe it has something to do with the linux kernel?

q0rban’s picture

Well now you're causing me to second guess myself.. I'll have to go check on the debian machine again... but I'd be using mozilla, not Fx.. doubt that will be an issue though...

drewish’s picture

i've used the flash player with firefox on windows and mac and haven't run into the issue on either.

ron collins’s picture

i'm seeing this problem on ubuntu with firefox and mozilla with my load under 0.5.

pvd02’s picture

NO NO NO NO NO!!!! Argh!!!

This is not a flash/browser/OS issue! This is an issue with a php.ini setting on your webserver!

I have been beating my head on this issue for a client for several weeks, almost to the point of them cancelling my contract for lack of performance and I've finally figured it out!!

Here's the issue:

When you click play on the flash player, it starts downloading an mp3 file to your machine that is created in real-time. When you click play, it causes a php script to run that generates the file. If you look in your php.ini file, you'll see a line that says:

max_execution_time = 30 ; Maximum execution time of each script, in seconds

If the flash applet hasn't finished downloading the whole song or audio file, then your screwed. You'll only be able to listen to the data that was generated in the first 30 seconds.

I've decided to kick mine up to 300. You say, "What! Are you stupid?" No, I have large files and a relatively slow link, so I have to compensate somehow.

This is the same with the download link. If you don't get the file downloaded in 30 seconds, that's all you get!

I found this out by replacing the default player w/ Quicktime and seeing the results of the streaming player as I changed this value in the php.ini file.

I was going to bypass all the real-time creation issues and try to link directly to the .mp3 file on the hard drive. I didn't care about the download counts and everything else. But once I realized that everything was scripted, I started looking at the web server and it's configs.

I've tried several things to try and solve this problem, but now I really understand the issue. I tried to run drupal on Apache 1.3 w/ PHP 4.x, I tried a different server, I upgraded from 4.6.x to 4.7.x.

Can you tell I'm excited? It's only 1:18AM and I've been working on this all night.

Stop by www.kmxt.org to see my progress.

Paul VanDyke
Kodiak, Alaska

sun’s picture

Title: Intermittent playback - SUSE Firefox » Intermittent playback

Just for the record: I have the same issue on a clean Drupal 4.7.3 install with audio.module running on Windows, server and client running on the same 100 MBit network. The player stops after 1 sec. There is no load from other applications on server and client side.

Eliyahu’s picture

I also have this problem with a fast line and a fast computer with a gig ram. It looks like it is going to start playing then just putters out and does not play. Strangely enough my mp3s play fine if I play them from an playlist. I hope someone is going to fix this.

vph’s picture

I seriously doubt that the reason for this problem is:
[quote]max_execution_time = 30 ; Maximum execution time of each script, in seconds[/quote]
If this is true, then the stopping must occur at exactly 30 seconds. But as another poster pointed out, the player could stop at 1sec. I had similar problems too.

I still think that the problem is the player. In particular, I think with players that show you the downloading process, you don't get this problem.