Just starting out? Need help? Post your questions and find answers here.
			
		
		
			
				
																			
								Azur 							 
						User 			
		Posts:  63  		Joined:  Sat Jan 28, 2012 11:13 am 		
		
						
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by Azur   »  Thu Nov 27, 2014 12:16 pm 
			
			
			
			
			Hello.
Can anyone confirm the getMusicRow function dosent fetch the position correctly ?
Code: Select all 
EnableExplicit
InitSound()
Define win=OpenWindow(#PB_Any,0,0,320,240,"",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
LoadMusic(0,"name.xm")
PlayMusic(0)
Repeat
  If WaitWindowEvent(5)=#PB_Event_CloseWindow
    End
  EndIf
  
  Debug GetMusicRow(0)
  
ForEver
You can find Xm modules here 
http://modarchive.org/ 
thx.
 
			
			
									
									
						 
		 
				
		
		 
	 
				
			
		
		
			
				
																			
								infratec 							 
						Always Here 			
		Posts:  7666  		Joined:  Sun Sep 07, 2008 12:45 pm 		
		
											Location:  Germany 
							
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by infratec   »  Thu Nov 27, 2014 1:58 pm 
			
			
			
			
			Hi,
row is not position.
Code: Select all 
EnableExplicit
Define.i Win, Row, OldRow, Pos, OldPos
InitSound()
Win = OpenWindow(#PB_Any,0,0,320,240,"",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
If LoadMusic(0,"fall.xm")
  PlayMusic(0)
EndIf 
Repeat
  
  If WindowEvent() = #PB_Event_CloseWindow
    End
  EndIf
  
  If IsMusic(0)
    Row = GetMusicRow(0)
    Pos = GetMusicPosition(0)
    If Row <> OldRow Or Pos <> OldPos
      Debug Str(Pos) + " " + Str(Row)
      OldRow = Row
      OldPos = Pos
    EndIf
  EndIf
  
ForEver
Bernd
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Azur 							 
						User 			
		Posts:  63  		Joined:  Sat Jan 28, 2012 11:13 am 		
		
						
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by Azur   »  Thu Nov 27, 2014 2:18 pm 
			
			
			
			
			Yes my bad, the word "position" was not a good choice ( Frenchfrog here ). 
Your example works better since it fetch all rows number. Thx, i will study this. 
But there is a +-1 second shift between the row position and the actual audio. 
Is this bufferisation related ?