LinHES Forums
http://forum.linhes.org/

Off Topic realy light linux distro for backgound music dev.
http://forum.linhes.org/viewtopic.php?f=5&t=19781
Page 1 of 1

Author:  simonf [ Wed Apr 08, 2009 6:53 pm ]
Post subject:  Off Topic realy light linux distro for backgound music dev.

Hi all,

This is probably the wrong place to ask but ill start here anyhow

I am trying to make a simple background music player I provided a demo of the app based on the following VB.net code

Code:
Module Client

    Dim WithEvents WMP As Microsoft.DirectX.AudioVideoPlayback.Audio = Nothing
    Dim Playing As Boolean = False
    Dim NextTrack As String = ""


    Const ServerDownloadsPath = "http://www.XXXXXXXX.com/media/servlet/secure/audio/mpeg/"

    Sub Main()


        Console.WriteLine(Now() & " Starting ")
        Console.WriteLine(Now() & " SMS Jukebox Client ")
        Console.WriteLine(Now() & " (c) Simon Flanagan ")
        Console.WriteLine(Now() & " 2009 ")
        Console.WriteLine(Now() & " Waiting For First Item ")
        While True


            If NextTrack > "" Then

                If Not My.Computer.FileSystem.FileExists(NextTrack) Then
                    Console.WriteLine(Now() & " Downloading : " & NextTrack)

                    Try
                        My.Computer.Network.DownloadFile( _
                            ServerDownloadsPath & NextTrack, _
                                NextTrack, _
                                    "XXXXXX", "XXXX")

                    Catch ex As Exception

                    End Try


                End If
                If Not Playing Then

                    PlayTrack(NextTrack)
                    NextTrack = ""

                End If

            Else
                NextTrack = DownloadString("http://XXXX.XXX/nextqueueitem.aspx")
                If NextTrack > "" Then
                    Console.WriteLine(Now() & " Queued : " & NextTrack)

                End If
            End If
            'wait a second
            Threading.Thread.Sleep(1000)
            If Playing AndAlso WMP.CurrentPosition = WMP.Duration Then
                Playing = False
            End If

        End While



    End Sub

    Sub PlayTrack(ByVal Filename As String)

        Console.WriteLine(Now() & " Playing : " & Filename)
        Try

            If IsNothing(WMP) Then
                WMP = New Microsoft.DirectX.AudioVideoPlayback.Audio( _
                        Filename, True)
            Else

                WMP.Open( _
                        Filename, True)

            End If

            Playing = True

        Catch ex As Exception

        End Try


    End Sub
    Public Function DownloadString(ByVal address As String) As String

        Try
            Dim client As System.Net.WebClient = New System.Net.WebClient()

            Dim reply As String = client.DownloadString(address)

            Return reply


        Catch ex As Exception
            Return ""
        End Try

    End Function

End Module


Basically what it does is listens to a http server for the name of the next track, if the track does not exists then it downloads it. Then it plays the track.

I want to find a very lite linux distribution suitable for doing the same task and maybe impiment this as a script i have done a little bit of scripting before (mostly adjusting others scripts to suit my needs ).

I am sure it could be done in less than 10 lines of script using say mplayer as the player.

I thought of altering my code above to use mplayer then using MONO but it did seem a little over the top.

I initialy will be running this on a very lite pc based system but hopefully want to run it on something much simpler maybe an ARM based HDD media Player I want to try and bring the cost per unit below 150$US

Any suggestions on a distribution, and any simple devices that hay be able to do what I want ??

Author:  novellahub [ Thu Apr 09, 2009 5:31 am ]
Post subject: 

Check out AntiX:

http://antix.mepis.org/index.php/Main_Page

Also check out mpd/ncmpc:

http://antix.mepis.org/index.php/Command_Line_Apps

Author:  squiffy [ Sun Apr 12, 2009 4:57 pm ]
Post subject:  Re: Off Topic realy light linux distro for backgound music d

simonf wrote:
Hi all,
...
Basically what it does is listens to a http server for the name of the next track, if the track does not exists then it downloads it. Then it plays the track.

I want to find a very lite linux distribution suitable for doing the same task and maybe impiment this as a script i have done a little bit of scripting before (mostly adjusting others scripts to suit my needs ).

Any suggestions on a distribution, and any simple devices that hay be able to do what I want ??


Simon,

Try looking at either of:

Slax (build your own custom distro on the fly)

or

TinyCore Linux (by the same guy who originated Damn Small Linux).

Both can be recast very small through the process of remastering.

Alternatively, you can try forking GeexBox from France. It already includes MPlayer natively in the build. It does UPnP out of the box and can handle SaMBa shares natively.

The source code is available for all distros if you want to recompile on your own machine.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/