1 /* { dg-do compile } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-O1 -march=core2" } */
5 typedef long long ogg_int64_t
;
7 typedef struct vorbis_info
12 typedef struct OggVorbis_File
16 ogg_int64_t
*pcmlengths
;
21 extern double ov_time_total (OggVorbis_File
* vf
, int i
);
22 extern int ov_pcm_seek_page (OggVorbis_File
* vf
, ogg_int64_t pos
);
25 ov_time_seek_page (OggVorbis_File
* vf
, double seconds
)
28 ogg_int64_t pcm_total
= 0;
29 double time_total
= 0.;
31 if (vf
->ready_state
< 2)
38 for (link
= 0; link
< vf
->links
; link
++)
40 double addsec
= ov_time_total (vf
, link
);
41 if (seconds
< time_total
+ addsec
)
44 pcm_total
+= vf
->pcmlengths
[link
* 2 + 1];
47 if (link
== vf
->links
)
52 pcm_total
+ (seconds
- time_total
) * vf
->vi
[link
].rate
;
53 return (ov_pcm_seek_page (vf
, target
));