It is proved that the Wiener algebra of functions on a connected compact abelian group whose BohrFourier spectra are contained in a fixed subsemigroup of the (additive) dual group, is projective free. The semigroup is assumed to contain zero and have the property that it does not contain both a nonzero element and its opposite. The projective free property is proved also for the algebra of continuous functions with the same condition on their Bohr-Fourier spectra. As an application, the connected components of the set of factorable matrices are described. The proofs are based on a key result on homotopies of continuous maps on the maximal ideal spaces of the algebras under consideration.