HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #278

Ticket #278: libsndfile-1.0.21.patch

File libsndfile-1.0.21.patch, 1.7 KB (added by michaelvoliveira, 5 years ago)

Patch to update sndfile-play-beos functions! it play sounds now!! \o/ and Replace orginal sndfile-play

  • programs/Makefile.am

    diff -Naur libsndfile-1.0.21/programs/Makefile.am libsndfile-1.0.21-haiku/programs/Makefile.am
    old new  
    1616sndfile_info_SOURCES = sndfile-info.c 
    1717sndfile_info_LDADD = $(top_builddir)/src/libsndfile.la 
    1818 
    19 sndfile_play_SOURCES = sndfile-play.c 
    20 sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) 
     19sndfile_play_SOURCES = sndfile-play-beos.cpp test-sndfile-metadata-set.py 
     20sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) -lbe -lmedia 
    2121 
    2222sndfile_convert_SOURCES = sndfile-convert.c common.c common.h 
    2323sndfile_convert_LDADD = $(top_builddir)/src/libsndfile.la 
  • programs/sndfile-play-beos.cpp

    diff -Naur libsndfile-1.0.21/programs/sndfile-play-beos.cpp libsndfile-1.0.21-haiku/programs/sndfile-play-beos.cpp
    old new  
    3030**      BeOS functions for playing a sound. 
    3131*/ 
    3232 
    33 #if defined (__BEOS__) 
     33#if defined(__BEOS__) || defined(__HAIKU__) 
    3434 
    3535struct shared_data 
    3636{ 
    … …  
    6060        {       for (m = readcount ; m < count ; m++) 
    6161                        buffer [m] = 0 ; 
    6262                } 
    63         if (data->sfinfo.pcmbitwidth < 16)  
     63        if (readcount > count) 
    6464        {       for (m = 0 ; m < count ; m++) 
    6565                        buffer [m] *= 256 ; 
    6666                } 
    … …  
    7878 
    7979        for (k = 1 ; k < argc ; k++) 
    8080        {       printf ("Playing %s\n", argv [k]) ;      
    81                 if (! (data.sndfile = sf_open_read (argv [k], &data.sfinfo))) 
     81                if (! (data.sndfile = sf_open (argv [k], SFM_READ, &data.sfinfo))) 
    8282                {       sf_perror (NULL) ; 
    8383                        continue ; 
    8484                        } ; 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/