Mercurial > audlegacy-plugins
comparison src/madplug/plugin.c @ 807:0f9c8d4d3ac4 trunk
[svn] - make use of new millisecond seek API.
| author | yaz |
|---|---|
| date | Mon, 12 Mar 2007 11:03:24 -0700 |
| parents | 7ac48f3855b1 |
| children | 44a922a4a591 |
comparison
equal
deleted
inserted
replaced
| 806:74abcb9cafae | 807:0f9c8d4d3ac4 |
|---|---|
| 458 info.playback = playback; | 458 info.playback = playback; |
| 459 g_mutex_unlock(pb_mutex); | 459 g_mutex_unlock(pb_mutex); |
| 460 playback->output->pause(paused); | 460 playback->output->pause(paused); |
| 461 } | 461 } |
| 462 | 462 |
| 463 static void audmad_seek(InputPlayback *playback, int time) | 463 static void audmad_mseek(InputPlayback *playback, gulong millisecond) |
| 464 { | 464 { |
| 465 g_mutex_lock(pb_mutex); | 465 g_mutex_lock(pb_mutex); |
| 466 info.playback = playback; | 466 info.playback = playback; |
| 467 /* xmms gives us the desired seek time in seconds */ | 467 info.seek = millisecond; |
| 468 info.seek = time; | |
| 469 g_mutex_unlock(pb_mutex); | 468 g_mutex_unlock(pb_mutex); |
| 469 } | |
| 470 | |
| 471 static void audmad_seek(InputPlayback *playback, gint time) | |
| 472 { | |
| 473 audmad_mseek(playback, time * 1000); | |
| 470 } | 474 } |
| 471 | 475 |
| 472 /** | 476 /** |
| 473 * Scan the given file or URL. | 477 * Scan the given file or URL. |
| 474 * Fills in the title string and the track length in milliseconds. | 478 * Fills in the title string and the track length in milliseconds. |
| 739 mad_plugin->get_song_info = audmad_get_song_info; | 743 mad_plugin->get_song_info = audmad_get_song_info; |
| 740 mad_plugin->file_info_box = audmad_get_file_info; | 744 mad_plugin->file_info_box = audmad_get_file_info; |
| 741 mad_plugin->get_song_tuple = audmad_get_song_tuple; | 745 mad_plugin->get_song_tuple = audmad_get_song_tuple; |
| 742 mad_plugin->is_our_file_from_vfs = audmad_is_our_fd; | 746 mad_plugin->is_our_file_from_vfs = audmad_is_our_fd; |
| 743 mad_plugin->vfs_extensions = fmts; | 747 mad_plugin->vfs_extensions = fmts; |
| 748 mad_plugin->mseek = audmad_mseek; | |
| 744 | 749 |
| 745 return mad_plugin; | 750 return mad_plugin; |
| 746 } | 751 } |
